From 2136ea04e709d79e2e3d288bf46df5aa397b656a Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Tue, 31 Mar 2009 17:43:08 -0700 Subject: Fix check-as to not check on a peer-group. --- scripts/bgp/vyatta-bgp.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl index 2609e381..610fb571 100755 --- a/scripts/bgp/vyatta-bgp.pl +++ b/scripts/bgp/vyatta-bgp.pl @@ -82,16 +82,17 @@ sub check_for_peer_groups { } } -# make sure nodes are either in a peer group of have +# make sure nodes are either in a peer group or have # a remote AS assigned to them. sub check_as { my ($neighbor, $as, $pg) = @_; die "neighbor not defined\n" unless $neighbor; - die "neighbor:$neighbor must be address\n" unless is_ip_v4_or_v6($neighbor); die "AS not defined\n" unless $as; # if this is peer-group then short circuit this + return if ! is_ip_v4_or_v6($neighbor); + my $config = new Vyatta::Config; $config->setLevel("protocols bgp $as neighbor $neighbor"); my $remoteas = $config->returnValue("remote-as"); -- cgit v1.2.3