summaryrefslogtreecommitdiff
path: root/scripts/bgp
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2009-03-31 17:43:08 -0700
committerStig Thormodsrud <stig@vyatta.com>2009-03-31 17:43:08 -0700
commit2136ea04e709d79e2e3d288bf46df5aa397b656a (patch)
tree1ef54810ee3fdff1ec311ee404d6dbc9060be1a8 /scripts/bgp
parent8a0924f19a09c8a543ad0c4f2034ecbf9d722115 (diff)
downloadvyatta-cfg-quagga-2136ea04e709d79e2e3d288bf46df5aa397b656a.tar.gz
vyatta-cfg-quagga-2136ea04e709d79e2e3d288bf46df5aa397b656a.zip
Fix check-as to not check on a peer-group.
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 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");