diff options
-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 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" |