summaryrefslogtreecommitdiff
path: root/scripts/bgp/vyatta-bgp.pl
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-10-28 14:19:54 +0100
committerDaniil Baturin <daniil@baturin.org>2018-10-28 14:19:54 +0100
commitf5aaf437d83022b6f6f707cb542dbcbc05aadb15 (patch)
tree1c4bd49c85e8e9aee825eb97b3bc80ebf5fc3586 /scripts/bgp/vyatta-bgp.pl
parent569a97fc0e9fd4a729cca5a36cc2bdba066d7356 (diff)
downloadvyatta-cfg-quagga-f5aaf437d83022b6f6f707cb542dbcbc05aadb15.tar.gz
vyatta-cfg-quagga-f5aaf437d83022b6f6f707cb542dbcbc05aadb15.zip
T944: ensure correct ordering of BGP option deletion to prevent route leaks.
Diffstat (limited to 'scripts/bgp/vyatta-bgp.pl')
-rwxr-xr-xscripts/bgp/vyatta-bgp.pl13
1 files changed, 12 insertions, 1 deletions
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";