From 5c5d43dabcc8ea068c2b58b796239748c49ed490 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 31 Mar 2009 09:51:21 -0700 Subject: Swap order of parameters Since peer-group can be undef, make it be last for safety with arg list. --- scripts/bgp/vyatta-bgp.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.3