diff options
author | Patrick Kelsey <pkelsey@FreeBSD.org> | 2015-07-06 02:16:08 +0000 |
---|---|---|
committer | Patrick Kelsey <pkelsey@FreeBSD.org> | 2015-07-06 02:16:08 +0000 |
commit | 7041091186ddb72670e3e2d8254859ed31d3f2e6 (patch) | |
tree | a4829ce6205db3fdb0e6cebd0d396f5c4094bb3b /print-ip.c | |
parent | d3b6650ba68c44e3a488aac17bbe56d0cd0e870d (diff) |
Diffstat (limited to 'print-ip.c')
-rw-r--r-- | print-ip.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/print-ip.c b/print-ip.c index 830cfb324aa4..ceea5363f28b 100644 --- a/print-ip.c +++ b/print-ip.c @@ -436,12 +436,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); @@ -531,9 +529,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 ")); @@ -688,11 +687,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; |