summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-11-21 22:13:25 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-11-21 22:15:38 +0100
commitb2443937b06d79f1caa46cdb7625e3d6831b2166 (patch)
tree2453ec6f035aa56fa7978383b795693982fc1e3b /vtysh
parentMerge pull request #3326 from qlyoung/fix-lla-reinstallation (diff)
downloadfrr-b2443937b06d79f1caa46cdb7625e3d6831b2166.tar.xz
frr-b2443937b06d79f1caa46cdb7625e3d6831b2166.zip
vtysh: Don't attempt to reconnect the non-instanced ospf process
When running ospf instances we should not attempt to reconnect the default ospf instance on running a command. This commit should be targeted enough because in the case of normal operation we connect to everything we should and only set the VTYSH_WAS_ACTIVE flag for those we truly have lost connection too. Before: donna.cumulusnetworks.com# config t donna.cumulusnetworks.com(config)# router ospf 100 Warning: connecting to ospfd...failed! donna.cumulusnetworks.com(config-router)# After: donna.cumulusnetworks.com# conf t donna.cumulusnetworks.com(config)# router ospf 100 donna.cumulusnetworks.com(config-router)# end donna.cumulusnetworks.com# Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index cd78551cb..f57a4d9dd 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -577,7 +577,7 @@ static int vtysh_execute_func(const char *line, int pager)
&& (cmd->daemon == vtysh_client[i].flag)) {
for (vc = &vtysh_client[i]; vc;
vc = vc->next)
- if (vc->fd < 0)
+ if (vc->fd == VTYSH_WAS_ACTIVE)
vtysh_reconnect(vc);
}
if (vtysh_client[i].fd < 0