mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 16:13:18 +01:00
More IPv6 fixes
This commit is contained in:
parent
1710f9ce7c
commit
bdb673a642
@ -485,12 +485,12 @@ sub valid_6address( $ ) {
|
||||
return 0 unless ( @address == $max ) || $address =~ /::/;
|
||||
return 0 if $address =~ /:::/ || $address =~ /::.*::/;
|
||||
|
||||
unless ( $address eq '::' ) {
|
||||
unless ( $address =~ tr/:/:/ == 2 && ( $address =~ /^::/ || $address =~ /::$/ ) ) {
|
||||
return 0 if $address =~ /^:/ || $address =~ /:$/;
|
||||
}
|
||||
|
||||
for my $a ( @address ) {
|
||||
return 0 unless $a eq '' || ( $a =~ /^[a-fA-f\d]+$/ && oct "0x$a" < 65536 );
|
||||
}
|
||||
for my $a ( @address ) {
|
||||
return 0 unless $a eq '' || ( $a =~ /^[a-fA-f\d]+$/ && length $a < 5 );
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user