Per issue #6202
Very long passwords (>79 chars) get truncated: save truncated
length in nbrp->auth.md5key_len instead of original length.
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
if (password_len >= sizeof(nbrp->auth.md5key))
vty_out(vty, "%% password has been truncated to %zu "
"characters.", sizeof(nbrp->auth.md5key) - 1);
- nbrp->auth.md5key_len = password_len;
+ nbrp->auth.md5key_len = strlen(nbrp->auth.md5key);
nbrp->auth.method = AUTH_MD5SIG;
}