Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 6725 - tcpdump ignores /etc/protocols
tcpdump ignores /etc/protocols
Product: Red Hat Linux
Classification: Retired
Component: tcpdump (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Depends On:
  Show dependency treegraph
Reported: 1999-11-04 11:51 EST by B. K. Oxley (binkley)
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-12-22 09:48:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description B. K. Oxley (binkley) 1999-11-04 11:51:36 EST
RedHat's enhanced tcpdump ignores /etc/protocols; it has
hard-coded strings for the protocol names it recognizes: all
others are only accepted by number.  To fix:

#include <netdb.h>

Then, update eth_p_parse:

	if (!strcmp(id, "x25"))
		return htons(ETH_P_X25);

        /* Check for protocol in /etc/protocols: */
	if (pe = getprotobyname (id))
	  return htons (pe->p_proto);

	return htons(atoi(id));

libpcap seems to already do this it seems.

Comment 1 Jeff Johnson 1999-12-22 09:48:59 EST
Fixed in tcpdump-3.4-17. Thanks for the patch.
Comment 2 richard.wittmer 2000-01-13 10:03:59 EST
I have seen this problem in my lab (at least its seems to be the same thing).
I have had to move a machine in my lab back to 6.0 to get a reliable tcpdump.
I'd love to try the fixed version, but i'm at a loss as to where I would find
the tcpdump-3.4-17 package. Can you let me know where it is? Thanks.

Comment 3 Jeff Johnson 2000-01-13 10:30:59 EST

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