diff options
| author | Patrick Kelsey <pkelsey@FreeBSD.org> | 2015-07-08 16:19:32 +0000 | 
|---|---|---|
| committer | Patrick Kelsey <pkelsey@FreeBSD.org> | 2015-07-08 16:19:32 +0000 | 
| commit | 8bdc5a6251ddffc81a013f36b4384c8ace9c4bec (patch) | |
| tree | f0c2243cc0a2a59f3eb1354ba3987d4cbcb788bc /contrib/tcpdump/print-ip.c | |
| parent | 6bae05d951855544018d42bbf8c04f3ceea630b8 (diff) | |
| parent | 7041091186ddb72670e3e2d8254859ed31d3f2e6 (diff) | |
Notes
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 0e3ae96530c8..edf00762434e 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;  | 
