Allow wide ipranges in IPv6

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9068 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2008-12-16 00:02:17 +00:00
parent 8c92588e14
commit 823ed26e30

View File

@ -555,10 +555,13 @@ sub validate_6range( $$ ) {
my @low = split ":", $low;
my @high = split ":", $high;
if ( @low == @high ) {
my ( $l, $h) = ( pop @low, pop @high );
return 1 if hex "0x$l" <= hex "0x$h" && join( ":", @low ) eq join( ":", @high );
while ( @low ) {
my ( $l, $h) = ( shift @low, shift @high );
next if $l eq $h;
return 1 if hex "0x$l" < hex "0x$h";
}
}
fatal_error "Invalid IPv6 Range ($low-$high)";