summaryrefslogtreecommitdiffstats
path: root/ldpd/ldp_vty_conf.c
diff options
context:
space:
mode:
authorG. Paul Ziemba <paulz@labn.net>2020-04-15 04:08:57 +0200
committerG. Paul Ziemba <paulz@labn.net>2020-04-15 04:08:57 +0200
commit25db1317e824aec01fca4bce29c0a090b099aab0 (patch)
tree4763578e2eec911419e653cab0ad1ab98c38eb4f /ldpd/ldp_vty_conf.c
parentMerge pull request #6225 from qlyoung/fix-zebra-counter-printf-specifiers (diff)
downloadfrr-25db1317e824aec01fca4bce29c0a090b099aab0.tar.xz
frr-25db1317e824aec01fca4bce29c0a090b099aab0.zip
ldpd: ldp_vty_neighbor_password(): fix auth.md5key_len calculation
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>
Diffstat (limited to 'ldpd/ldp_vty_conf.c')
-rw-r--r--ldpd/ldp_vty_conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldpd/ldp_vty_conf.c b/ldpd/ldp_vty_conf.c
index 05b896256..84a5c0b1b 100644
--- a/ldpd/ldp_vty_conf.c
+++ b/ldpd/ldp_vty_conf.c
@@ -1077,7 +1077,7 @@ ldp_vty_neighbor_password(struct vty *vty, const char *negate, struct in_addr ls
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;
}