X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/aa9960a2c3d98c38d385c10e54d9160cb89feba0..9e7cd40a7af81c08da36ef3cc4e0a951d58dd01e:/print-icmp.c?ds=sidebyside diff --git a/print-icmp.c b/print-icmp.c index a5b94d63..ebf4693c 100644 --- a/print-icmp.c +++ b/print-icmp.c @@ -347,6 +347,7 @@ icmp_print(netdissect_options *ndo, const u_char *bp, u_int plen, const u_char * char buf[MAXHOSTNAMELEN + 100]; struct cksum_vec vec[1]; + ndo->ndo_protocol = "icmp"; dp = (const struct icmp *)bp; ext_dp = (const struct icmp_ext_t *)bp; ip = (const struct ip *)bp2; @@ -591,6 +592,9 @@ icmp_print(netdissect_options *ndo, const u_char *bp, u_int plen, const u_char * ndo->ndo_snapend = snapend_save; } + /* ndo_protocol reassignment after ip_print() call */ + ndo->ndo_protocol = "icmp"; + /* * Attempt to decode the MPLS extensions only for some ICMP types. */ @@ -696,11 +700,5 @@ icmp_print(netdissect_options *ndo, const u_char *bp, u_int plen, const u_char * return; trunc: - ND_PRINT("[|icmp]"); + nd_print_trunc(ndo); } -/* - * Local Variables: - * c-style: whitesmith - * c-basic-offset: 8 - * End: - */