From b7ae6ac4db91d0d8a3e2508a50550332e28c8b5b Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 12 Jun 2018 18:14:52 +0000 Subject: [PATCH] vtysh: fix config write Changing vtysh to use vty_out() for everything broke writing to config files. Signed-off-by: Quentin Young --- vtysh/vtysh.c | 3 +++ 1 file changed, 3 insertions(+) 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", -- 2.39.5