summaryrefslogtreecommitdiff
path: root/scripts/bgp
diff options
context:
space:
mode:
authorRuben Herold <ruben@insecure.pw>2019-07-15 23:36:39 +0200
committerRuben Herold <ruben@insecure.pw>2019-07-15 23:36:39 +0200
commitde95893f0ee0fdcf807cd245d902a78f83d1b553 (patch)
tree1a995671701fb86394a33ecbf1fe932f900bb0e9 /scripts/bgp
parentab8d5030e3e0f6c35bb99de243cf5d08dea2b30e (diff)
downloadvyatta-cfg-quagga-de95893f0ee0fdcf807cd245d902a78f83d1b553.tar.gz
vyatta-cfg-quagga-de95893f0ee0fdcf807cd245d902a78f83d1b553.zip
T1529: Fix detection of interface names
Diffstat (limited to 'scripts/bgp')
-rwxr-xr-xscripts/bgp/vyatta-bgp.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl
index 93fb601f..b39556af 100755
--- a/scripts/bgp/vyatta-bgp.pl
+++ b/scripts/bgp/vyatta-bgp.pl
@@ -1207,8 +1207,9 @@ sub list_peer_groups {
sub check_neighbor_ip {
my $neighbor = shift;
- if ($neighbor =~ /^(\w+)$/) {
- exit 0;
+ my $found = grep { $_ eq $neighbor } Vyatta::Misc::getInterfaces();
+ if ($found != 0) {
+ exit 0;
}
die "Can't set neighbor address to local system IP.\n"