forked from extern/shorewall_code
Yet another IPv6 Address Normalization fix
This commit is contained in:
parent
bdb673a642
commit
deb45c5a27
@ -550,11 +550,12 @@ sub normalize_6addr( $ ) {
|
||||
$addr =~ s/^:/0:/;
|
||||
$addr =~ s/:$/:0/;
|
||||
|
||||
while ( $addr =~ tr/:/:/ < 7 ) {
|
||||
$addr =~ s/::/:0::/;
|
||||
}
|
||||
|
||||
$addr =~ s/::/:0:/;
|
||||
$addr =~ s/::/:0::/ while $addr =~ tr/:/:/ < 7;
|
||||
#
|
||||
# Note: "s/::/:0:/g" doesn't work here
|
||||
#
|
||||
1 while $addr =~ s/::/:0:/;
|
||||
|
||||
$addr =~ s/^0+:/0:/;
|
||||
|
||||
$addr;
|
||||
|
Loading…
Reference in New Issue
Block a user