diff options
author | Ruben Herold <ruben@insecure.pw> | 2019-07-15 23:36:39 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-08-31 02:08:29 +0200 |
commit | 9cdab97fd070331c765ed3a0406184815fc566b9 (patch) | |
tree | bbb82618063760d01bfaf85e0a1cf610d878f348 /scripts/bgp/vyatta-bgp.pl | |
parent | 1804d6db4b68fed7fb87307a0aa8432eb53924a4 (diff) | |
download | vyatta-cfg-quagga-9cdab97fd070331c765ed3a0406184815fc566b9.tar.gz vyatta-cfg-quagga-9cdab97fd070331c765ed3a0406184815fc566b9.zip |
T1529: Fix detection of interface names
Diffstat (limited to 'scripts/bgp/vyatta-bgp.pl')
-rwxr-xr-x | scripts/bgp/vyatta-bgp.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl index 928f79d1..4d27e02c 100755 --- a/scripts/bgp/vyatta-bgp.pl +++ b/scripts/bgp/vyatta-bgp.pl @@ -1199,8 +1199,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" |