summaryrefslogtreecommitdiff
path: root/print-mpls.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-05-11 10:40:40 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-05-17 12:51:47 +0200
commitd07444a5f284ac724cdc7a120831f1585e7185b9 (patch)
tree0951a386ea3c42ef4f06e4620a76f18b30371c5a /print-mpls.c
parentdb3f9f277f4283318a760791dac2bed9507b4793 (diff)
downloadtcpdump-d07444a5f284ac724cdc7a120831f1585e7185b9.tar.gz
Add more nd_print_trunc() calls
Update the output of some tests accordingly.
Diffstat (limited to 'print-mpls.c')
-rw-r--r--print-mpls.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/print-mpls.c b/print-mpls.c
index e45f2826..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" : " ",