Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 580513

Summary: tshark snaplen parameter does not work
Product: Red Hat Enterprise Linux 5 Reporter: Karel Srot <ksrot>
Component: wiresharkAssignee: Jan Safranek <jsafrane>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: low Docs Contact:
Priority: low    
Version: 5.5CC: mvadkert
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: wireshark-1.0.15-2 Doc Type: Bug Fix
Doc Text:
Previously, tshakr's '-s <size>' option worked only for <size> greater than 68 bytes. If lower <size> was specified, tshar captured just 68 bytes of incoming packets. With this update, '-s' option is fixed and sizes lower than 68 bytes work as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-08 05:00:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Srot 2010-04-08 13:04:30 UTC
Description of problem:
tshark snaplen option does not work. See the reproducer below.

-s  <capture snaplen>
           Set the default snapshot length to use when capturing live data.  
           No more than snaplen bytes of each network packet will be read 
           into memory, or saved to disk.


Version-Release number of selected component (if applicable):
wireshark-1.0.8-1.el5_3.1


How reproducible:
always


Steps to Reproduce:
# tshark -i eth0 -s 30 -c 5 -w Tmpfile      # capturing 30 bytes at most
Running as user "root" and group "root". This could be dangerous.
Capturing on eth0
5 
# tshark -V -r Tmpfile | grep -i 'capture length'
Running as user "root" and group "root". This could be dangerous.
    Capture Length: 66 bytes
    Capture Length: 62 bytes
    Capture Length: 68 bytes
    Capture Length: 62 bytes
    Capture Length: 66 bytes

Actual results:
Packets are not truncated

Expected results:
Packets are truncated

Comment 2 RHEL Program Management 2011-05-31 14:29:52 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 3 RHEL Program Management 2012-04-02 10:35:43 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 4 Jan Safranek 2012-04-18 08:18:27 UTC
Upstream patch: http://anonsvn.wireshark.org/viewvc?view=revision&revision=27526

Comment 6 Jan Safranek 2012-05-29 12:53:37 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, tshakr's '-s <size>' option worked only for <size> greater than 68 bytes. If lower <size> was specified, tshar captured just 68 bytes of incoming packets. With this update, '-s' option is fixed and sizes lower than 68 bytes work as expected.

Comment 10 errata-xmlrpc 2013-01-08 05:00:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0125.html