RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1441597 - tcpdump: tcpdump can not dump all packets.
Summary: tcpdump: tcpdump can not dump all packets.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tcpdump
Version: 7.4
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: ---
Assignee: Martin Sehnoutka
QA Contact: Jaroslav Aster
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-12 09:58 UTC by xmu
Modified: 2017-08-01 12:13 UTC (History)
7 users (show)

Fixed In Version: tcpdump-4.9.0-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1444755 (view as bug list)
Environment:
Last Closed: 2017-08-01 12:13:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1871 0 normal SHIPPED_LIVE Moderate: tcpdump security, bug fix, and enhancement update 2017-08-01 16:00:24 UTC

Description xmu 2017-04-12 09:58:47 UTC
Description of problem:
tcpdump can not dump all packets.
when test a short tcp flow, the last packet is droped.

tcpdump-4.5.1-3.el7.x86_64 and 3.10.0-637.el7.x86_64: pass
tcpdump-4.9.0-3.el7.x86_64 and 3.10.0-637.el7.x86_64: fail

Version-Release number of selected component (if applicable):
tcpdump-4.9.0-3.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. server: #nc -l 7788
2. client: 
#tcpdump -i $interface port 7788
#echo hello| nc $dstip $dstport

Actual results:
7 packets captured
8 packets received by filter
1 packet dropped by kernel >>> the packet is the last ACK.


Expected results:
no dropped packets

Additional info:
Another reproducer: this issue is found when run the case: 
it's a UDP flow with TOS.
http://pkgs.devel.redhat.com/cgit/tests/kernel/tree/networking/socket/bugs/dscp-bz990694

Comment 3 Martin Sehnoutka 2017-04-21 13:59:40 UTC
The new version of tcpdump uses bigger snaplen by default, this is probably the root cause of this bug. Compare:

Version 4.5.1:
# tcpdump -i eth0 port 55555
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
...

Version 4.9.0:
# tcpdump -n -i eth0 port 55555
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
...

Notice the difference in "capture size".

When running with previously default snaplen it works just fine:
# tcpdump -s 65535 -i eth0 port 55555 > /dev/null
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
^C8 packets captured
8 packets received by filter
0 packets dropped by kernel

It also works fine when using bigger capture buffer (-B), no name resolution (-n) or writing to file (-w), so I guess that the name resolution process takes too long and the capture buffer is meanwhile overflowed. Also when you run the nc communication twice, it is captured fine the second time:

# tcpdump  -i eth0 port 55555 > /dev/null
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C15 packets captured
16 packets received by filter
1 packet dropped by kernel

To sum up, I think this is a configuration issue not a bug, but if you want to make this work by default, we can reduce the snaplen size to its previous value.

Comment 12 errata-xmlrpc 2017-08-01 12:13:36 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.

https://access.redhat.com/errata/RHSA-2017:1871


Note You need to log in before you can comment on or make changes to this bug.