summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-31 09:51:21 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-31 09:51:21 -0700
commit5c5d43dabcc8ea068c2b58b796239748c49ed490 (patch)
tree51f5720311b0a683cbd72f1383fd34da3b06708b /scripts
parent3dab49d63f222af869a233d45ffd307f65f0c43a (diff)
downloadvyatta-cfg-quagga-5c5d43dabcc8ea068c2b58b796239748c49ed490.tar.gz
vyatta-cfg-quagga-5c5d43dabcc8ea068c2b58b796239748c49ed490.zip
Swap order of parameters
Since peer-group can be undef, make it be last for safety with arg list.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bgp/vyatta-bgp.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl
index 4bc27c53..2609e381 100755
--- a/scripts/bgp/vyatta-bgp.pl
+++ b/scripts/bgp/vyatta-bgp.pl
@@ -20,7 +20,7 @@ GetOptions(
check_peer_name($peername) if ($peername);
check_for_peer_groups( $pg, $as ) if ($checkpeergroups);
-check_as( $pg, $neighbor, $as ) if ($checkas);
+check_as( $neighbor, $as, $pg ) if ($checkas);
check_if_peer_group($pg) if ($checkifpeergroup);
exit 0;
@@ -85,10 +85,10 @@ sub check_for_peer_groups {
# make sure nodes are either in a peer group of have
# a remote AS assigned to them.
sub check_as {
- my ($pg,$neighbor, $as) = @_;
+ my ($neighbor, $as, $pg) = @_;
- die "Neighbor not defined" unless $neighbor;
- die "neighbor must be address" unless is_ip_v4_or_v6($neighbor);
+ 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