X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/1b69d2a8a141e97ce2d081fa92941b0cbb26c116..refs/heads/coverity_scan:/print-vqp.c diff --git a/print-vqp.c b/print-vqp.c index f87898e0..dca3c1e6 100644 --- a/print-vqp.c +++ b/print-vqp.c @@ -17,9 +17,7 @@ /* \summary: Cisco VLAN Query Protocol (VQP) printer */ -#ifdef HAVE_CONFIG_H #include -#endif #include "netdissect-stdinc.h" @@ -28,7 +26,7 @@ #include "extract.h" #include "addrtoname.h" -#define VQP_VERSION 1 +#define VQP_VERSION 1 /* * VQP common header @@ -132,7 +130,7 @@ vqp_print(netdissect_options *ndo, const u_char *pptr, u_int len) ND_PRINT("VQPv%u %s Message, error-code %s (%u), length %u", version, tok2str(vqp_msg_type_values, "unknown (%u)",GET_U_1(vqp_common_header->msg_type)), - tok2str(vqp_error_code_values, "unknown (%u)",GET_U_1(vqp_common_header->error_code)), + tok2str(vqp_error_code_values, "unknown", GET_U_1(vqp_common_header->error_code)), GET_U_1(vqp_common_header->error_code), len); return; @@ -143,7 +141,7 @@ vqp_print(netdissect_options *ndo, const u_char *pptr, u_int len) ND_PRINT("\n\tVQPv%u, %s Message, error-code %s (%u), seq 0x%08x, items %u, length %u", version, tok2str(vqp_msg_type_values, "unknown (%u)",GET_U_1(vqp_common_header->msg_type)), - tok2str(vqp_error_code_values, "unknown (%u)",GET_U_1(vqp_common_header->error_code)), + tok2str(vqp_error_code_values, "unknown", GET_U_1(vqp_common_header->error_code)), GET_U_1(vqp_common_header->error_code), GET_BE_U_4(vqp_common_header->sequence), nitems, @@ -195,9 +193,9 @@ vqp_print(netdissect_options *ndo, const u_char *pptr, u_int len) /* those objects have similar semantics - fall through */ case VQP_OBJ_MAC_ADDRESS: case VQP_OBJ_MAC_NULL: - if (vqp_obj_len != MAC_ADDR_LEN) + if (vqp_obj_len != MAC48_LEN) goto invalid; - ND_PRINT("%s", GET_ETHERADDR_STRING(tptr)); + ND_PRINT("%s", GET_MAC48_STRING(tptr)); break; default: if (ndo->ndo_vflag <= 1)