summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-04-06 02:52:32 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-04-06 02:52:32 +0200
commit97133f79155933685f6f839072d9d92a804a37dd (patch)
tree025729327a795c89aba46888af8b0ad897b9eca5 /tools
parenteigrpd: Fix add and delete of routes into the rib (diff)
parentMerge pull request #336 from dwalton76/bgpd-allowas-in-removal (diff)
downloadfrr-97133f79155933685f6f839072d9d92a804a37dd.tar.xz
frr-97133f79155933685f6f839072d9d92a804a37dd.zip
Merge remote-tracking branch 'origin/master' into EIGRP
Diffstat (limited to 'tools')
-rwxr-xr-xtools/frr-reload.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py
index 4c2630009..c91392da1 100755
--- a/tools/frr-reload.py
+++ b/tools/frr-reload.py
@@ -988,6 +988,21 @@ if __name__ == '__main__':
# the "neighbor 1.1.1.1 route-map FOO out" line...so we compare the
# configs again to put this line back.
+ # There are many keywords in quagga that can only appear one time under
+ # a context, take "bgp router-id" for example. If the config that we are
+ # reloading against has the following:
+ #
+ # router bgp 10
+ # bgp router-id 1.1.1.1
+ # bgp router-id 2.2.2.2
+ #
+ # The final config needs to contain "bgp router-id 2.2.2.2". On the
+ # first pass we will add "bgp router-id 2.2.2.2" but then on the second
+ # pass we will see that "bgp router-id 1.1.1.1" is missing and add that
+ # back which cancels out the "bgp router-id 2.2.2.2". The fix is for the
+ # second pass to include all of the "adds" from the first pass.
+ lines_to_add_first_pass = []
+
for x in range(2):
running = Config()
running.load_from_show_running()
@@ -995,6 +1010,11 @@ if __name__ == '__main__':
(lines_to_add, lines_to_del) = compare_context_objects(newconf, running)
+ if x == 0:
+ lines_to_add_first_pass = lines_to_add
+ else:
+ lines_to_add.extend(lines_to_add_first_pass)
+
# Only do deletes on the first pass. The reason being if we
# configure a bgp neighbor via "neighbor swp1 interface" quagga
# will automatically add: