X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/7885cfa165458a05ef818c34ee03affc79f03725..c39d40a767a1ae36171e5bcbf6f157ff3e80fb6c:/print-babel.c diff --git a/print-babel.c b/print-babel.c index 6e748710..d802a720 100644 --- a/print-babel.c +++ b/print-babel.c @@ -50,7 +50,6 @@ #include "addrtoname.h" #include "extract.h" - static void babel_print_v2(netdissect_options *, const u_char *cp, u_int length); void @@ -82,7 +81,6 @@ babel_print(netdissect_options *ndo, trunc: nd_print_trunc(ndo); - return; } /* TLVs */ @@ -386,7 +384,7 @@ babel_print_v2_tlvs(netdissect_options *ndo, u_char v4_prefix[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0, 0, 0, 0 }; u_char v6_prefix[16] = {0}; - + i = 0; while(i < tlvs_length) { const u_char *message; @@ -396,7 +394,6 @@ babel_print_v2_tlvs(netdissect_options *ndo, message = cp + i; ICHECK(i, 1); - ND_TCHECK_1(message); if((type = GET_U_1(message)) == MESSAGE_PAD1) { ND_PRINT(ndo->ndo_vflag ? "\n\tPad 1" : " pad1"); i += 1; @@ -759,7 +756,7 @@ babel_print_v2_tlvs(netdissect_options *ndo, case MESSAGE_MAC: { if (!ndo->ndo_vflag) ND_PRINT(" mac"); - else { + else { ND_PRINT("\n\tMAC "); ND_PRINT("len %u", len); } @@ -847,8 +844,8 @@ babel_print_v2(netdissect_options *ndo, /* If there's a trailer, process the TLVs in the trailer */ if (length != 0) { - if(ndo->ndo_vflag) ND_PRINT("\n\t----"); - else ND_PRINT(" |"); + if(ndo->ndo_vflag) ND_PRINT("\n\t----"); + else ND_PRINT(" |"); ret = babel_print_v2_tlvs(ndo, cp, length, length); if (ret == -1) goto trunc; @@ -863,5 +860,4 @@ babel_print_v2(netdissect_options *ndo, invalid: nd_print_invalid(ndo); - return; }