]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-vrrp.c
Fix mkdep invocations.
[tcpdump] / print-vrrp.c
index 73eef9a28de85c02ddb21f19972ae82b11717d3f..fe3104f92dd57e99ce3cb4a208f002128c066196 100644 (file)
@@ -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));