From f5aaf437d83022b6f6f707cb542dbcbc05aadb15 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Sun, 28 Oct 2018 14:19:54 +0100 Subject: T944: ensure correct ordering of BGP option deletion to prevent route leaks. --- scripts/bgp/vyatta-bgp.pl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'scripts/bgp/vyatta-bgp.pl') diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl index 97a0b861..856d3dcd 100755 --- a/scripts/bgp/vyatta-bgp.pl +++ b/scripts/bgp/vyatta-bgp.pl @@ -1596,7 +1596,18 @@ sub main ## deletes with priority # delete everything in neighbor, ordered nodes last - my @ordered = ('remote-as', 'peer-group', 'shutdown', 'route-map', 'prefix-list', 'filter-list', 'distribute-list', 'unsuppress-map'); + my @ordered = ('remote-as', 'peer-group', 'shutdown', + 'address-family ipv4-unicast route-map', + 'address-family ipv4-unicast prefix-list', + 'address-family ipv4-unicast filter-list', + 'address-family ipv4-unicast distribute-list', + 'address-family ipv4-unicast unsuppress-map', + 'address-family ipv6-unicast route-map', + 'address-family ipv6-unicast prefix-list', + 'address-family ipv6-unicast filter-list', + 'address-family ipv6-unicast distribute-list', + 'address-family ipv6-unicast unsuppress-map'); + # notice the extra space in the level string. keeps the parent from being deleted. $qconfig->deleteConfigTreeRecursive('protocols bgp var neighbor var ', undef, \@ordered) || die "exiting $?\n"; $qconfig->deleteConfigTreeRecursive('protocols bgp var peer-group var ', undef, \@ordered) || die "exiting $?\n"; -- cgit v1.2.3