X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/c429fc4120116c407acf4f4df483ac5f069e2a63..c39d40a767a1ae36171e5bcbf6f157ff3e80fb6c:/print-eap.c?ds=sidebyside diff --git a/print-eap.c b/print-eap.c index 0d9f62b7..b0542ad9 100644 --- a/print-eap.c +++ b/print-eap.c @@ -154,9 +154,7 @@ eap_print(netdissect_options *ndo, u_int type, subtype, len; int count; - ND_TCHECK_1(cp); type = GET_U_1(cp); - ND_TCHECK_2(cp + 2); len = GET_BE_U_2(cp + 2); if(len != length) { goto trunc; @@ -171,7 +169,6 @@ eap_print(netdissect_options *ndo, if (type == EAP_REQUEST || type == EAP_RESPONSE) { /* RFC 3748 Section 4.1 */ - ND_TCHECK_1(cp + 4); subtype = GET_U_1(cp + 4); ND_PRINT("\n\t\t Type %s (%u)", tok2str(eap_type_values, "unknown", subtype), @@ -181,14 +178,14 @@ eap_print(netdissect_options *ndo, case EAP_TYPE_IDENTITY: if (len - 5 > 0) { ND_PRINT(", Identity: "); - (void)nd_printzp(ndo, cp + 5, len - 5, NULL); + nd_printjnp(ndo, cp + 5, len - 5); } break; case EAP_TYPE_NOTIFICATION: if (len - 5 > 0) { ND_PRINT(", Notification: "); - (void)nd_printzp(ndo, cp + 5, len - 5, NULL); + nd_printjnp(ndo, cp + 5, len - 5); } break; @@ -201,7 +198,6 @@ eap_print(netdissect_options *ndo, * type one octet per type */ while (count < (int)len) { - ND_TCHECK_1(cp + count); ND_PRINT(" %s (%u),", tok2str(eap_type_values, "unknown", GET_U_1((cp + count))), GET_U_1(cp + count)); @@ -211,7 +207,6 @@ eap_print(netdissect_options *ndo, case EAP_TYPE_TTLS: case EAP_TYPE_TLS: - ND_TCHECK_1(cp + 5); if (subtype == EAP_TYPE_TTLS) ND_PRINT(" TTLSv%u", EAP_TTLS_VERSION(GET_U_1((cp + 5)))); @@ -220,13 +215,11 @@ eap_print(netdissect_options *ndo, GET_U_1(cp + 5)); if (EAP_TLS_EXTRACT_BIT_L(GET_U_1(cp + 5))) { - ND_TCHECK_4(cp + 6); ND_PRINT(" len %u", GET_BE_U_4(cp + 6)); } break; case EAP_TYPE_FAST: - ND_TCHECK_1(cp + 5); ND_PRINT(" FASTv%u", EAP_TTLS_VERSION(GET_U_1((cp + 5)))); ND_PRINT(" flags [%s] 0x%02x,", @@ -234,7 +227,6 @@ eap_print(netdissect_options *ndo, GET_U_1(cp + 5)); if (EAP_TLS_EXTRACT_BIT_L(GET_U_1(cp + 5))) { - ND_TCHECK_4(cp + 6); ND_PRINT(" len %u", GET_BE_U_4(cp + 6)); } @@ -243,7 +235,6 @@ eap_print(netdissect_options *ndo, case EAP_TYPE_AKA: case EAP_TYPE_SIM: - ND_TCHECK_1(cp + 5); ND_PRINT(" subtype [%s] 0x%02x,", tok2str(eap_aka_subtype_values, "unknown", GET_U_1((cp + 5))), GET_U_1(cp + 5)); @@ -263,7 +254,6 @@ eap_print(netdissect_options *ndo, return; trunc: nd_print_trunc(ndo); - return; } void