diff options
-rwxr-xr-x | scripts/bgp/vyatta-bgp.pl | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl index ba5cb033..e206fc3f 100755 --- a/scripts/bgp/vyatta-bgp.pl +++ b/scripts/bgp/vyatta-bgp.pl @@ -1706,16 +1706,22 @@ sub confed_iBGP_ASN { my @neighbors = $config->listOrigNodes('neighbor'); foreach my $neighbor (@neighbors) { my $remoteas = $config->returnValue("neighbor $neighbor remote-as"); - if (("$testas" eq "$remoteas") || ("$testas" eq "internal")) { - exit 1; + if (defined $remoteas) { + if (("$testas" eq "$remoteas") || ("$testas" eq "internal")) { + exit 1; + } } $remoteas = $config->returnValue("neighbor $neighbor interface remote-as"); - if (("$testas" eq "$remoteas") || ("$testas" eq "internal")) { - exit 1; + if (defined $remoteas) { + if (("$testas" eq "$remoteas") || ("$testas" eq "internal")) { + exit 1; + } } $remoteas = $config->returnValue("neighbor $neighbor interface v6only remote-as"); - if (("$testas" eq "$remoteas") || ("$testas" eq "internal")) { - exit 1; + if (defined $remoteas) { + if (("$testas" eq "$remoteas") || ("$testas" eq "internal")) { + exit 1; + } } } |