forked from extern/shorewall_code
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:
parent
8c92588e14
commit
823ed26e30
@ -555,10 +555,13 @@ sub validate_6range( $$ ) {
|
|||||||
my @low = split ":", $low;
|
my @low = split ":", $low;
|
||||||
my @high = split ":", $high;
|
my @high = split ":", $high;
|
||||||
|
|
||||||
|
|
||||||
if ( @low == @high ) {
|
if ( @low == @high ) {
|
||||||
my ( $l, $h) = ( pop @low, pop @high );
|
while ( @low ) {
|
||||||
|
my ( $l, $h) = ( shift @low, shift @high );
|
||||||
return 1 if hex "0x$l" <= hex "0x$h" && join( ":", @low ) eq join( ":", @high );
|
next if $l eq $h;
|
||||||
|
return 1 if hex "0x$l" < hex "0x$h";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fatal_error "Invalid IPv6 Range ($low-$high)";
|
fatal_error "Invalid IPv6 Range ($low-$high)";
|
||||||
|
Loading…
Reference in New Issue
Block a user