summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-04-28 21:05:57 +0200
committerGitHub <noreply@github.com>2020-04-28 21:05:57 +0200
commit425c241a49356d1e7698329875d6aa5f42867788 (patch)
tree2bf852d2cd468c3a7e292113c74a56a34cb4ea03
parentMerge pull request #6295 from ton31337/feature/show_bgp_afi_safi_sntpfx (diff)
parenttools: fix frr-reload AF issue with ldpd (diff)
downloadfrr-425c241a49356d1e7698329875d6aa5f42867788.tar.xz
frr-425c241a49356d1e7698329875d6aa5f42867788.zip
Merge pull request #6302 from volta-networks/fix_ldpd_af_reload
tools: fix frr-reload AF issue with ldpd
-rwxr-xr-xtools/frr-reload.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py
index 45843faf1..1f9f42538 100755
--- a/tools/frr-reload.py
+++ b/tools/frr-reload.py
@@ -1077,6 +1077,13 @@ def compare_context_objects(newconf, running):
add_cmd = ('no ' + running_ctx_keys[0],)
lines_to_add.append((add_cmd, None))
+ # if this an interface sub-subcontext in an address-family block in ldpd and
+ # we are already deleting the whole context, then ignore this
+ elif (len(running_ctx_keys) > 2 and running_ctx_keys[0].startswith('mpls ldp') and
+ running_ctx_keys[1].startswith('address-family') and
+ (running_ctx_keys[:2], None) in lines_to_del):
+ continue
+
# Non-global context
elif running_ctx_keys and not any("address-family" in key for key in running_ctx_keys):
lines_to_del.append((running_ctx_keys, None))