]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ip.c
Use more nd_print_invalid()
[tcpdump] / print-ip.c
index af0debc77119e8b4ca9a99d048f49eb352a7d730..8b263ccc81fe0c074cc88a7a8cebd1442b67b871 100644 (file)
@@ -99,7 +99,7 @@ ip_finddst(netdissect_options *ndo,
        const u_char *cp;
 
        cp = (const u_char *)(ip + 1);
-       length = (IP_HL(ip) << 2);
+       length = IP_HL(ip) * 4;
        if (length < sizeof(struct ip))
                goto trunc;
        length -= sizeof(struct ip);
@@ -349,7 +349,8 @@ again:
 
        case IPPROTO_AH:
                if (!ND_TTEST_1(ipds->cp)) {
-                       ND_PRINT("[|AH]");
+                       ndo->ndo_protocol = "ah";
+                       nd_print_trunc(ndo);
                        break;
                }
                ipds->nh = EXTRACT_U_1(ipds->cp);