From: Francois-Xavier Le Bail Date: Wed, 21 Feb 2018 13:08:56 +0000 (+0100) Subject: IS-IS: Get rid of an unneeded label X-Git-Tag: tcpdump-4.99-bp~1262 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/2aa79cfe24c850d12259cf28ab83aa7422d8f22b IS-IS: Get rid of an unneeded label --- diff --git a/print-isoclns.c b/print-isoclns.c index 15d6cd7c..329d52f2 100644 --- a/print-isoclns.c +++ b/print-isoclns.c @@ -2678,7 +2678,7 @@ isis_print(netdissect_options *ndo, case ISIS_TLV_ISNEIGH_VARLEN: if (!ND_TTEST_1(tptr) || tmp < 3) /* min. TLV length */ - goto trunctlv; + goto trunc; lan_alen = EXTRACT_U_1(tptr); /* LAN address length */ tptr++; if (lan_alen == 0) { @@ -2701,13 +2701,13 @@ isis_print(netdissect_options *ndo, case ISIS_TLV_MT_IS_REACH: mt_len = isis_print_mtid(ndo, tptr, "\n\t "); if (mt_len == 0) /* did something go wrong ? */ - goto trunctlv; + goto trunc; tptr+=mt_len; tmp-=mt_len; while (tmp >= 2+NODE_ID_LEN+3+1) { ext_is_len = isis_print_ext_is_reach(ndo, tptr, "\n\t ", tlv_type, tmp); if (ext_is_len == 0) /* did something go wrong ? */ - goto trunctlv; + goto trunc; tmp-=ext_is_len; tptr+=ext_is_len; @@ -2718,7 +2718,7 @@ isis_print(netdissect_options *ndo, while (tmp >= NODE_ID_LEN+1) { /* is it worth attempting a decode ? */ ext_is_len = isis_print_ext_is_reach(ndo, tptr, "\n\t ", tlv_type, tmp); if (ext_is_len == 0) /* did something go wrong ? */ - goto trunctlv; + goto trunc; tmp-=ext_is_len; tptr+=ext_is_len; } @@ -2728,7 +2728,7 @@ isis_print(netdissect_options *ndo, while (tmp >= NODE_ID_LEN+3+1) { /* is it worth attempting a decode ? */ ext_is_len = isis_print_ext_is_reach(ndo, tptr, "\n\t ", tlv_type, tmp); if (ext_is_len == 0) /* did something go wrong ? */ - goto trunctlv; + goto trunc; tmp-=ext_is_len; tptr+=ext_is_len; } @@ -2774,7 +2774,7 @@ isis_print(netdissect_options *ndo, while (tmp>0) { ext_ip_len = isis_print_extd_ip_reach(ndo, tptr, "\n\t ", AF_INET); if (ext_ip_len == 0) /* did something go wrong ? */ - goto trunctlv; + goto trunc; tptr+=ext_ip_len; tmp-=ext_ip_len; } @@ -2783,7 +2783,7 @@ isis_print(netdissect_options *ndo, case ISIS_TLV_MT_IP_REACH: mt_len = isis_print_mtid(ndo, tptr, "\n\t "); if (mt_len == 0) { /* did something go wrong ? */ - goto trunctlv; + goto trunc; } tptr+=mt_len; tmp-=mt_len; @@ -2791,7 +2791,7 @@ isis_print(netdissect_options *ndo, while (tmp>0) { ext_ip_len = isis_print_extd_ip_reach(ndo, tptr, "\n\t ", AF_INET); if (ext_ip_len == 0) /* did something go wrong ? */ - goto trunctlv; + goto trunc; tptr+=ext_ip_len; tmp-=ext_ip_len; } @@ -2801,7 +2801,7 @@ isis_print(netdissect_options *ndo, while (tmp>0) { ext_ip_len = isis_print_extd_ip_reach(ndo, tptr, "\n\t ", AF_INET6); if (ext_ip_len == 0) /* did something go wrong ? */ - goto trunctlv; + goto trunc; tptr+=ext_ip_len; tmp-=ext_ip_len; } @@ -2810,7 +2810,7 @@ isis_print(netdissect_options *ndo, case ISIS_TLV_MT_IP6_REACH: mt_len = isis_print_mtid(ndo, tptr, "\n\t "); if (mt_len == 0) { /* did something go wrong ? */ - goto trunctlv; + goto trunc; } tptr+=mt_len; tmp-=mt_len; @@ -2818,7 +2818,7 @@ isis_print(netdissect_options *ndo, while (tmp>0) { ext_ip_len = isis_print_extd_ip_reach(ndo, tptr, "\n\t ", AF_INET6); if (ext_ip_len == 0) /* did something go wrong ? */ - goto trunctlv; + goto trunc; tptr+=ext_ip_len; tmp-=ext_ip_len; } @@ -2846,7 +2846,7 @@ isis_print(netdissect_options *ndo, switch (EXTRACT_U_1(tptr)) { case ISIS_SUBTLV_AUTH_SIMPLE: if (fn_printzp(ndo, tptr + 1, tlv_len - 1, ndo->ndo_snapend)) - goto trunctlv; + goto trunc; break; case ISIS_SUBTLV_AUTH_MD5: for(i=1;indo_snapend)) - goto trunctlv; + goto trunc; break; case ISIS_TLV_SHARED_RISK_GROUP: @@ -3068,7 +3068,7 @@ isis_print(netdissect_options *ndo, if (tmp!=1) { mt_len = isis_print_mtid(ndo, tptr, "\n\t "); if (mt_len == 0) /* did something go wrong ? */ - goto trunctlv; + goto trunc; tptr+=mt_len; tmp-=mt_len; } else { @@ -3229,14 +3229,9 @@ isis_print(netdissect_options *ndo, } return (1); - trunc: +trunc: ND_PRINT("%s", tstr); return (1); - - trunctlv: - ND_PRINT("\n\t\t"); - ND_PRINT("%s", tstr); - return(1); } static void diff --git a/tests/isis-extd-ipreach-oobr.out b/tests/isis-extd-ipreach-oobr.out index a8a1fe6f..70e94d96 100644 --- a/tests/isis-extd-ipreach-oobr.out +++ b/tests/isis-extd-ipreach-oobr.out @@ -10875,5 +10875,4 @@ IPv6 prefix: ::/0, Distribution: up, Metric: 0, Internal IPv6 prefix: ::/0, Distribution: up, Metric: 0, Internal IPv6 prefix: ::/0, Distribution: up, Metric: 0, Internal - IPv6 prefix: ::/0, Distribution: up, Metric: 0, Internal - [|isis] + IPv6 prefix: ::/0, Distribution: up, Metric: 0, Internal [|isis]