Correct $minroot logic

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2017-12-22 09:08:27 -08:00
parent b5a6067588
commit 5a8e9cd0a3
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -317,7 +317,7 @@ sub initialize( $$ ) {
%mapbase = (); %mapbase = ();
%mapbase1 = (); %mapbase1 = ();
$baseseq = 0; $baseseq = 0;
$minroot = 0; $minroot = undef;
$loopback_interface = ''; $loopback_interface = '';
%validzoneoptions = ( mss => NUMERIC, %validzoneoptions = ( mss => NUMERIC,
@ -1204,6 +1204,7 @@ sub process_interface( $$ ) {
} }
my $wildcard = 0; my $wildcard = 0;
my $physwild = 0;
my $root; my $root;
if ( $interface =~ /\+$/ ) { if ( $interface =~ /\+$/ ) {
@ -1212,7 +1213,7 @@ sub process_interface( $$ ) {
$roots{$root} = $interface; $roots{$root} = $interface;
my $len = length $root; my $len = length $root;
if ( $minroot ) { if ( defined $minroot ) {
$minroot = $len if $minroot > $len; $minroot = $len if $minroot > $len;
} else { } else {
$minroot = $len; $minroot = $len;