]> git.puffer.fish Git - matthieu/frr.git/commitdiff
quagga-reload.py thinks the BGP ASN changed when it did not
authorDaniel Walton <dwalton@cumulusnetworks.com>
Tue, 21 Jun 2016 14:52:43 +0000 (14:52 +0000)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Tue, 21 Jun 2016 14:53:20 +0000 (14:53 +0000)
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-11463
(cherry picked from commit ab5f8310801f1870a7c5c22e1595e4452c558ddb)

tools/quagga-reload.py

index 27fc3830c664ba2ef3a076eec18b049827db927f..9c0cbb48d617601b8e904de67577b8d7c27a787e 100755 (executable)
@@ -567,7 +567,11 @@ def compare_context_objects(newconf, running):
         if running_ctx_keys not in newconf.contexts:
 
             # Check if bgp's local ASN has changed. If yes, just restart it
-            if "router bgp" in running_ctx_keys[0]:
+            # We check that the len is 1 here so that we only look at ('router bgp 10')
+            # and not ('router bgp 10', 'address-family ipv4 unicast'). The
+            # latter could cause a false restart_bgpd positive if ipv4 unicast is in
+            # running but not in newconf.
+            if "router bgp" in running_ctx_keys[0] and len(running_ctx_keys) == 1:
                 restart_bgpd = True
                 continue