diff options
-rw-r--r-- | scripts/vyatta_quagga_utils.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/vyatta_quagga_utils.pl b/scripts/vyatta_quagga_utils.pl index e2e871f8..8806e120 100644 --- a/scripts/vyatta_quagga_utils.pl +++ b/scripts/vyatta_quagga_utils.pl @@ -20,12 +20,14 @@ exit 0; sub check_prefix_boundry() { my $prefix = shift; - my $net, $cidr; + my ($net, $network, $cidr); $net = new NetAddr::IP $prefix; - $cidr = $net->network(); - if ( "$cidr" ne "$prefix" ) { - print "Your prefix must fall on a natural network boundry. Did you mean $cidr?\n"; + $network = $net->network(); + $cidr = $net->cidr(); + if ("$cidr" ne "$network") { + print "Your prefix must fall on a natural network boundry. ", + "Did you mean $network?\n"; exit 1; } |