X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/2bfa05b9b60c07fd23daf7077a9488fe043a202c..c39d40a767a1ae36171e5bcbf6f157ff3e80fb6c:/print-vrrp.c diff --git a/print-vrrp.c b/print-vrrp.c index 972a8cd7..ee97974e 100644 --- a/print-vrrp.c +++ b/print-vrrp.c @@ -165,16 +165,13 @@ vrrp_print(netdissect_options *ndo, bp += 4; } if (version == 2 && auth_type == VRRP_AUTH_SIMPLE) { /* simple text password */ - ND_TCHECK_1(bp + 7); ND_PRINT(" auth \""); - if (nd_printn(ndo, bp, 8, ndo->ndo_snapend)) { - ND_PRINT("\""); - goto trunc; - } + /* + * RFC 2338 Section 5.3.10: "If the configured authentication string + * is shorter than 8 bytes, the remaining space MUST be zero-filled. + */ + nd_printjnp(ndo, bp, 8); ND_PRINT("\""); } } - return; -trunc: - nd_print_trunc(ndo); }