mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-23 14:48:51 +01:00
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 @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)";
|
||||
|
Loading…
Reference in New Issue
Block a user