From cd07d2be9d0d6e841fb75f67539862eb13b3cb35 Mon Sep 17 00:00:00 2001 From: aapostoliuk Date: Mon, 8 Apr 2024 16:51:33 +0300 Subject: T3437: Removed warning Perl messages after adding peer to confederation Removed warning Perl messages after adding peer to confederation --- scripts/bgp/vyatta-bgp.pl | 18 ++++++++++++------ 1 file 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; + } } } -- cgit v1.2.3