From 7294fd8057c19caff7f0da9b5502d81a31e33561 Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Fri, 2 Oct 2020 19:11:10 +0100 Subject: LDP: Use nd_trunc_longjmp(). Do not enable ND_LONGJMP_FROM_TCHECK yet because decode_prefix4() and decode_prefix6() would require an nd_trunc_longjmp() each in the middle of the code, maybe a cleaner solution emerges later. --- print-ldp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'print-ldp.c') diff --git a/print-ldp.c b/print-ldp.c index 7f029e6d..75e6dd20 100644 --- a/print-ldp.c +++ b/print-ldp.c @@ -538,8 +538,7 @@ ldp_tlv_print(netdissect_options *ndo, return(tlv_len+4); /* Type & Length fields not included */ trunc: - nd_print_trunc(ndo); - return 0; + nd_trunc_longjmp(ndo); invalid: return(tlv_len+4); /* Type & Length fields not included */ @@ -697,6 +696,5 @@ ldp_pdu_print(netdissect_options *ndo, } return pdu_len+4; trunc: - nd_print_trunc(ndo); - return 0; + nd_trunc_longjmp(ndo); } -- cgit v1.2.1