summaryrefslogtreecommitdiffstats
path: root/src/vty
diff options
context:
space:
mode:
authorMykola Shchetinin <mykola@razormaker.com>2018-08-03 16:44:07 +0300
committerHarald Welte <laforge@gnumonks.org>2018-08-05 07:01:53 +0000
commit893e49e99359fb80b25aa3ba5e1c8f03b07e66a3 (patch)
tree3dbedb1e0fb2b950299d627c34c358ccb5ace62b /src/vty
parent7ecb034f87500271ed4562b8db8185be726bd3de (diff)
vty/vty.c: fix bug in vty_config_write
the vty_config_write function should write: line vty login to the configuration file when the login is enabled. Otherwise after saving the configuration the next login will be performed without password checking (password_check variable will be 0 though it must be 1) Change-Id: I39050b6bf617dac10d3fccc3106f67bdcca1d05a
Diffstat (limited to 'src/vty')
-rw-r--r--src/vty/vty.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vty/vty.c b/src/vty/vty.c
index aab0607d..ad535371 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -1694,6 +1694,8 @@ static int vty_config_write(struct vty *vty)
/* login */
if (!password_check)
vty_out(vty, " no login%s", VTY_NEWLINE);
+ else
+ vty_out(vty, " login%s", VTY_NEWLINE);
/* bind */
if (vty_bind_addr && (strcmp(vty_bind_addr, VTY_BIND_ADDR_DEFAULT) != 0))