X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/da20bc56d6100b5275d6f85c4a25bac1dab4e57e..de0c7fc746c37eb83e15a6890d30dc6f608e9d76:/print-vrrp.c diff --git a/print-vrrp.c b/print-vrrp.c index 73eef9a2..fe3104f9 100644 --- a/print-vrrp.c +++ b/print-vrrp.c @@ -120,13 +120,13 @@ vrrp_print(netdissect_options *ndo, if (version < 2 || version > 3 || type != VRRP_TYPE_ADVERTISEMENT) return; ND_TCHECK(bp[2]); - ND_PRINT((ndo, ", vrid %u, prio %u", bp[1], bp[2])); + ND_PRINT((ndo, ", vrid %u, prio %u", EXTRACT_U_1(bp + 1), EXTRACT_U_1(bp + 2))); ND_TCHECK(bp[5]); if (version == 2) { auth_type = bp[4]; ND_PRINT((ndo, ", authtype %s", tok2str(auth2str, NULL, auth_type))); - ND_PRINT((ndo, ", intvl %us, length %u", bp[5], len)); + ND_PRINT((ndo, ", intvl %us, length %u", EXTRACT_U_1(bp + 5), len)); } else { /* version == 3 */ uint16_t intvl = (bp[4] & 0x0f) << 8 | bp[5]; ND_PRINT((ndo, ", intvl %ucs, length %u", intvl, len));