forked from extern/shorewall_code
Correct IPV6 range parsing
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
7a98c7b9e5
commit
71611233fb
@ -779,6 +779,18 @@ sub normalize_6addr( $ ) {
|
|||||||
sub validate_6range( $$ ) {
|
sub validate_6range( $$ ) {
|
||||||
my ( $low, $high ) = @_;
|
my ( $low, $high ) = @_;
|
||||||
|
|
||||||
|
if ( $low =~ /^\[(.+)\]$/ ) {
|
||||||
|
$low = $1;
|
||||||
|
} elsif ( $low =~ /^\[(.+)\]\/(\d+)$/ ) {
|
||||||
|
$low = join( '/', $1, $2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $high =~ /^\[(.+)\]$/ ) {
|
||||||
|
$high = $1;
|
||||||
|
} elsif ( $high =~ /^\[(.+)\]\/(\d+)$/ ) {
|
||||||
|
$high = join( '/', $1, $2 );
|
||||||
|
}
|
||||||
|
|
||||||
validate_6address $low, 0;
|
validate_6address $low, 0;
|
||||||
validate_6address $high, 0;
|
validate_6address $high, 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user