X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/546558eabd81cfc36a81a4df728fdfea0d83b41a..6df4852ec38a5f7342f35e8d62918f33ace103f8:/print-mpls.c diff --git a/print-mpls.c b/print-mpls.c index db9be428..77ed2f3b 100644 --- a/print-mpls.c +++ b/print-mpls.c @@ -69,10 +69,8 @@ mpls_print(netdissect_options *ndo, const u_char *bp, u_int length) ND_PRINT("MPLS"); do { ND_TCHECK_LEN(p, sizeof(label_entry)); - if (length < sizeof(label_entry)) { - ND_PRINT("[|MPLS], length %u", length); - return; - } + if (length < sizeof(label_entry)) + goto trunc; label_entry = EXTRACT_BE_U_4(p); ND_PRINT("%s(label %u", (label_stack_depth && ndo->ndo_vflag) ? "\n\t" : " ", @@ -211,13 +209,5 @@ mpls_print(netdissect_options *ndo, const u_char *bp, u_int length) return; trunc: - ND_PRINT("[|MPLS]"); + nd_print_trunc(ndo); } - - -/* - * Local Variables: - * c-style: whitesmith - * c-basic-offset: 8 - * End: - */