]> 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 71c7559b25f98f1c1e6ad78054b9765807825072..ceea5363f28b3b00b5a8923b5f498028cad034cb 100644 (file)
@@ -529,10 +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"));
-           return;
+             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 "));