]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ip.c
Do the dump file Capsicum stuff in a common routine.
[tcpdump] / print-ip.c
index f178fef359df5e598c3e0fe8cc82ce95e4af77ef..ceea5363f28b3b00b5a8923b5f498028cad034cb 100644 (file)
@@ -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 "));