]> git.proxmox.com Git - mirror_frr.git/commitdiff
vtysh: fix config write
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 12 Jun 2018 18:14:52 +0000 (18:14 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 12 Jun 2018 18:14:52 +0000 (18:14 +0000)
Changing vtysh to use vty_out() for everything broke writing to config
files.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
vtysh/vtysh.c

index 63553469ddf57844cbc8e4ca5e0ba78a9e0255e5..c6e060500b83a4e4b72da761ae4999e2bfad557e 100644 (file)
@@ -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",