summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2015-10-21 00:00:40 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2015-10-21 00:00:40 +0200
commit0b960b4dfad490138a7ad1d6c9bae2caeff01754 (patch)
tree34f515e6deca2f8559527413fbe3a54528c93852 /tools
parentEnable "bgp network import-check exact" by default. Without this it is (diff)
downloadfrr-0b960b4dfad490138a7ad1d6c9bae2caeff01754.tar.xz
frr-0b960b4dfad490138a7ad1d6c9bae2caeff01754.zip
Display the BGP ipv4 unicast configuration under "address-family ipv4 unicast".
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-6739 Before router bgp 10 bgp router-id 10.1.1.1 bgp log-neighbor-changes no bgp default ipv4-unicast network 9.9.9.9/32 neighbor 10.1.1.2 remote-as 10 neighbor 10.1.1.2 shutdown neighbor 10.1.1.2 update-source lo neighbor 10.1.1.2 advertisement-interval 1 neighbor 10.1.1.2 timers connect 10 neighbor 10.1.1.2 activate neighbor 10.1.1.2 next-hop-self neighbor 10.1.1.2 route-map BAR in neighbor 10.1.1.2 route-map FOO out neighbor 20.1.2.2 remote-as 20 neighbor 20.1.2.2 shutdown neighbor 20.1.2.2 advertisement-interval 1 neighbor 20.1.2.2 timers connect 10 neighbor 20.1.2.2 activate neighbor 20.1.2.2 route-map HAA in neighbor 20.1.2.2 route-map BOO out ! address-family ipv6 network 2001:1:1:1::/64 exit-address-family ! After ! router bgp 10 bgp router-id 10.1.1.1 bgp log-neighbor-changes no bgp default ipv4-unicast no bgp network import-check neighbor 10.1.1.2 remote-as 10 neighbor 10.1.1.2 shutdown neighbor 10.1.1.2 update-source lo neighbor 10.1.1.2 advertisement-interval 1 neighbor 10.1.1.2 timers connect 10 neighbor 20.1.2.2 remote-as 20 neighbor 20.1.2.2 shutdown neighbor 20.1.2.2 advertisement-interval 1 neighbor 20.1.2.2 timers connect 10 ! address-family ipv4 unicast network 9.9.9.9/32 neighbor 10.1.1.2 activate neighbor 10.1.1.2 next-hop-self neighbor 10.1.1.2 route-map BAR in neighbor 10.1.1.2 route-map FOO out neighbor 20.1.2.2 activate neighbor 20.1.2.2 route-map HAA in neighbor 20.1.2.2 route-map BOO out exit-address-family ! address-family ipv6 unicast network 2001:1:1:1::/64 exit-address-family !
Diffstat (limited to 'tools')
-rwxr-xr-xtools/quagga-reload.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/tools/quagga-reload.py b/tools/quagga-reload.py
index 343d61ae7..11266a1a2 100755
--- a/tools/quagga-reload.py
+++ b/tools/quagga-reload.py
@@ -292,17 +292,18 @@ end
elif "address-family " in line:
main_ctx_key = []
- if line != "address-family ipv4 unicast":
- # Save old context first
- self.save_contexts(ctx_keys, current_context_lines)
- current_context_lines = []
- main_ctx_key = copy.deepcopy(ctx_keys)
- logger.debug('LINE %-50s: entering sub-context, append to ctx_keys', line)
+ # Save old context first
+ self.save_contexts(ctx_keys, current_context_lines)
+ current_context_lines = []
+ main_ctx_key = copy.deepcopy(ctx_keys)
+ logger.debug('LINE %-50s: entering sub-context, append to ctx_keys', line)
- if line == "address-family ipv6":
- ctx_keys.append("address-family ipv6 unicast")
- else:
- ctx_keys.append(line)
+ if line == "address-family ipv6":
+ ctx_keys.append("address-family ipv6 unicast")
+ elif line == "address-family ipv4":
+ ctx_keys.append("address-family ipv4 unicast")
+ else:
+ ctx_keys.append(line)
else:
# Continuing in an existing context, add non-commented lines to it