]> git.puffer.fish Git - matthieu/frr.git/commitdiff
vtysh: Don't attempt to reconnect the non-instanced ospf process
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 21 Nov 2018 21:13:25 +0000 (16:13 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 15 Feb 2019 15:03:17 +0000 (10:03 -0500)
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>
vtysh/vtysh.c

index 8f998f84d203957a54e721de4bc82148d774d6f3..b42b56e9efd203007e37539135c7233d4a517df9 100644 (file)
@@ -576,7 +576,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