diff options
author | pkelsey <pkelsey@FreeBSD.org> | 2015-07-08 16:19:32 +0000 |
---|---|---|
committer | pkelsey <pkelsey@FreeBSD.org> | 2015-07-08 16:19:32 +0000 |
commit | 7e965066ede451d7a551dd68d6c59acf32e4846e (patch) | |
tree | f0c2243cc0a2a59f3eb1354ba3987d4cbcb788bc /contrib/tcpdump/print-ip.c | |
parent | 732211dc794db586649eabfc1d517b8a477440f5 (diff) | |
parent | c2704d8ede887d9fe69a9a11fe0755b09ec6895d (diff) | |
download | FreeBSD-src-7e965066ede451d7a551dd68d6c59acf32e4846e.zip FreeBSD-src-7e965066ede451d7a551dd68d6c59acf32e4846e.tar.gz |
MFV r285191: tcpdump 4.7.4.
Also, the changes made in r272451 and r272653 that were lost in the
merge of 4.6.2 (r276788) have been restored.
PR: 199568
Differential Revision: https://reviews.freebsd.org/D3007
Reviewed by: brooks, hiren
Approved by: jmallett (mentor)
MFC after: 1 month
Diffstat (limited to 'contrib/tcpdump/print-ip.c')
-rw-r--r-- | contrib/tcpdump/print-ip.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/contrib/tcpdump/print-ip.c b/contrib/tcpdump/print-ip.c index 0e3ae96..edf0076 100644 --- a/contrib/tcpdump/print-ip.c +++ b/contrib/tcpdump/print-ip.c @@ -438,12 +438,10 @@ again: } break; -#ifdef INET6 case IPPROTO_IPV6: /* ip6-in-ip encapsulation */ ip6_print(ndo, ipds->cp, ipds->len); break; -#endif /*INET6*/ case IPPROTO_RSVP: rsvp_print(ndo, ipds->cp, ipds->len); @@ -539,9 +537,10 @@ ip_print(netdissect_options *ndo, ipds->ip = (const struct ip *)bp; ND_TCHECK(ipds->ip->ip_vhl); if (IP_V(ipds->ip) != 4) { /* print version if != 4 */ - ND_PRINT((ndo, "IP%u ", IP_V(ipds->ip))); if (IP_V(ipds->ip) == 6) - ND_PRINT((ndo, ", wrong link-layer encapsulation")); + ND_PRINT((ndo, "IP6, wrong link-layer encapsulation ")); + else + ND_PRINT((ndo, "IP%u ", IP_V(ipds->ip))); } else if (!ndo->ndo_eflag) ND_PRINT((ndo, "IP ")); @@ -696,11 +695,9 @@ ipN_print(netdissect_options *ndo, register const u_char *bp, register u_int len case 4: ip_print (ndo, bp, length); return; -#ifdef INET6 case 6: ip6_print (ndo, bp, length); return; -#endif default: ND_PRINT((ndo, "unknown ip %d", IP_V(&hdr))); return; |