X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/202051bb55f5e99fb304c4b68cfb2a729fe2d55e..41ef9cfe38f86553ffd8f61b6f87e9c00baf5f07:/print-ip-demux.c?ds=sidebyside diff --git a/print-ip-demux.c b/print-ip-demux.c index 265658e7..f18055d6 100644 --- a/print-ip-demux.c +++ b/print-ip-demux.c @@ -39,8 +39,8 @@ void ip_print_demux(netdissect_options *ndo, const u_char *bp, - u_int length, u_int ver, int fragmented, u_int ttl_hl, u_int nh, - const u_char *iph) + u_int length, u_int ver, int fragmented, u_int ttl_hl, + uint8_t nh, const u_char *iph) { int advance; const char *p_name; @@ -66,15 +66,14 @@ again: case IPPROTO_ESP: { - u_int enh, padlen; - advance = esp_print(ndo, bp, length, - iph, &enh, &padlen); - if (advance <= 0) - break; - bp += advance; - length -= advance + padlen; - nh = enh & 0xff; - goto again; + esp_print(ndo, bp, length, iph, ver, fragmented, ttl_hl); + /* + * Either this has decrypted the payload and + * printed it, in which case there's nothing more + * to do, or it hasn't, in which case there's + * nothing more to do. + */ + break; } case IPPROTO_IPCOMP: @@ -111,7 +110,7 @@ again: case IPPROTO_ICMPV6: icmp6_print(ndo, bp, length, iph, fragmented); - return; + break; case IPPROTO_PIGP: /* @@ -156,10 +155,6 @@ again: case IPPROTO_IPV4: /* ipv4-in-ip encapsulation */ ip_print(ndo, bp, length); - if (! ndo->ndo_vflag) { - ND_PRINT(" (ipip-proto-4)"); - return; - } break; case IPPROTO_IPV6: