ND_PRINT("HSRPv%u", version);
if (version != 0)
return;
- ND_TCHECK_1(hp->hsrp_op_code);
ND_PRINT("-");
ND_PRINT("%s ",
tok2strary(op_code_str, "unknown (%u)", GET_U_1(hp->hsrp_op_code)));
if (GET_U_1(hp->hsrp_reserved) != 0) {
ND_PRINT("[reserved=%u!] ", GET_U_1(hp->hsrp_reserved));
}
- ND_TCHECK_4(hp->hsrp_virtaddr);
ND_PRINT("addr=%s", GET_IPADDR_STRING(hp->hsrp_virtaddr));
if (ndo->ndo_vflag) {
ND_PRINT(" hellotime=");
unsigned_relts_print(ndo, GET_U_1(hp->hsrp_holdtime));
ND_PRINT(" priority=%u", GET_U_1(hp->hsrp_priority));
ND_PRINT(" auth=\"");
- if (nd_printn(ndo, hp->hsrp_authdata, sizeof(hp->hsrp_authdata),
- ndo->ndo_snapend)) {
- ND_PRINT("\"");
- goto trunc;
- }
+ /*
+ * RFC 2281 Section 5.1 does not specify the encoding of
+ * Authentication Data explicitly, but zero padding can be
+ * inferred from the "recommended default value".
+ */
+ nd_printjnp(ndo, hp->hsrp_authdata, HSRP_AUTH_SIZE);
ND_PRINT("\"");
}
- return;
-trunc:
- nd_print_trunc(ndo);
}