From: Quentin Young Date: Tue, 12 Jun 2018 18:14:52 +0000 (+0000) Subject: vtysh: fix config write X-Git-Tag: frr-6.1-dev~339^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=b7ae6ac4db91d0d8a3e2508a50550332e28c8b5b;p=mirror%2Ffrr.git vtysh: fix config write Changing vtysh to use vty_out() for everything broke writing to config files. Signed-off-by: Quentin Young --- diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 63553469dd..c6e060500b 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",