X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/c67afe913011138a2504ec4d3d423b48e73b12f3..refs/pull/440/head:/print-ip.c diff --git a/print-ip.c b/print-ip.c index f178fef3..ceea5363 100644 --- a/print-ip.c +++ b/print-ip.c @@ -529,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 "));