summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-06-12 20:14:52 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-06-12 20:14:52 +0200
commitb7ae6ac4db91d0d8a3e2508a50550332e28c8b5b (patch)
tree0af4eb4d767728c87a54199b0d8b1f4030d6abfe /vtysh
parentMerge pull request #2402 from qlyoung/germx-hand-sanitizer-kills-99-percent-o... (diff)
downloadfrr-b7ae6ac4db91d0d8a3e2508a50550332e28c8b5b.tar.xz
frr-b7ae6ac4db91d0d8a3e2508a50550332e28c8b5b.zip
vtysh: fix config write
Changing vtysh to use vty_out() for everything broke writing to config files. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 63553469d..c6e060500 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -2646,7 +2646,10 @@ int vtysh_write_config_integrated(void)
vtysh_client_config(&vtysh_client[i], line);
vtysh_config_write();
+ vty->of_saved = vty->of;
+ vty->of = fp;
vtysh_config_dump();
+ vty->of = vty->of_saved;
if (fchmod(fd, CONFIGFILE_MASK) != 0) {
printf("%% Warning: can't chmod configuration file %s: %s\n",