summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-07-16 04:49:10 +0700
committerGitHub <noreply@github.com>2019-07-16 04:49:10 +0700
commitb0b49dd0310fc8862cfa664e7d5b8df0dc2b03f3 (patch)
tree1a995671701fb86394a33ecbf1fe932f900bb0e9
parent7ac4d9e3dbc8c01b17cf1c89675ddf1286338fc2 (diff)
parentde95893f0ee0fdcf807cd245d902a78f83d1b553 (diff)
downloadvyatta-cfg-quagga-b0b49dd0310fc8862cfa664e7d5b8df0dc2b03f3.tar.gz
vyatta-cfg-quagga-b0b49dd0310fc8862cfa664e7d5b8df0dc2b03f3.zip
Merge pull request #31 from ruben-herold/T1529
T1529: Fix interface name detection
-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"