forked from extern/shorewall_code
Correct IPv6 List Handling
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
db8f90f182
commit
1ede47034b
@ -6328,8 +6328,13 @@ sub isolate_source_interface( $ ) {
|
|||||||
} else {
|
} else {
|
||||||
$iiface = $source;
|
$iiface = $source;
|
||||||
}
|
}
|
||||||
} elsif ( $source =~ /^(.+?):<(.+)>\s*$/ ||
|
} else {
|
||||||
$source =~ /^(.+?):\[(.+)\]\s*$/ ||
|
$source =~ tr/<>/[]/;
|
||||||
|
|
||||||
|
if ( $source =~ /^(.+?):(\[(?:.+)\],\[(?:.+)\])$/ ) {
|
||||||
|
$iiface = $1;
|
||||||
|
$inets = $2;
|
||||||
|
} elsif ( $source =~ /^(.+?):\[(.+)\]\s*$/ ||
|
||||||
$source =~ /^(.+?):(!?\+.+)$/ ||
|
$source =~ /^(.+?):(!?\+.+)$/ ||
|
||||||
$source =~ /^(.+?):(!?[&%].+)$/ ||
|
$source =~ /^(.+?):(!?[&%].+)$/ ||
|
||||||
$source =~ /^(.+?):(\[.+\]\/(?:\d+))\s*$/
|
$source =~ /^(.+?):(\[.+\]\/(?:\d+))\s*$/
|
||||||
@ -6337,7 +6342,9 @@ sub isolate_source_interface( $ ) {
|
|||||||
$iiface = $1;
|
$iiface = $1;
|
||||||
$inets = $2;
|
$inets = $2;
|
||||||
} elsif ( $source =~ /:/ ) {
|
} elsif ( $source =~ /:/ ) {
|
||||||
if ( $source =~ /^<(.+)>$/ || $source =~ /^\[(.+)\]$/ ) {
|
if ( $source =~ /^\[(?:.+)\],\[(?:.+)\]$/ ){
|
||||||
|
$inets = $source;
|
||||||
|
} elsif ( $source =~ /^\[(.+)\]$/ ) {
|
||||||
$inets = $1;
|
$inets = $1;
|
||||||
} else {
|
} else {
|
||||||
$inets = $source;
|
$inets = $source;
|
||||||
@ -6347,6 +6354,7 @@ sub isolate_source_interface( $ ) {
|
|||||||
} else {
|
} else {
|
||||||
$iiface = $source;
|
$iiface = $source;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
( $iiface, $inets );
|
( $iiface, $inets );
|
||||||
}
|
}
|
||||||
@ -6438,8 +6446,13 @@ sub isolate_dest_interface( $$$$ ) {
|
|||||||
} else {
|
} else {
|
||||||
$diface = $dest;
|
$diface = $dest;
|
||||||
}
|
}
|
||||||
} elsif ( $dest =~ /^(.+?):<(.+)>\s*$/ ||
|
} else {
|
||||||
$dest =~ /^(.+?):\[(.+)\]\s*$/ ||
|
$dest =~ tr/<>/[]/;
|
||||||
|
|
||||||
|
if ( $dest =~ /^(.+?):(\[(?:.+)\],\[(?:.+)\])$/ ) {
|
||||||
|
$diface = $1;
|
||||||
|
$dnets = $2;
|
||||||
|
} elsif ( $dest =~ /^(.+?):\[(.+)\]\s*$/ ||
|
||||||
$dest =~ /^(.+?):(!?\+.+)$/ ||
|
$dest =~ /^(.+?):(!?\+.+)$/ ||
|
||||||
$dest =~ /^(.+?):(!?[&%].+)$/ ||
|
$dest =~ /^(.+?):(!?[&%].+)$/ ||
|
||||||
$dest =~ /^(.+?):(\[.+\]\/(?:\d+))\s*$/
|
$dest =~ /^(.+?):(\[.+\]\/(?:\d+))\s*$/
|
||||||
@ -6447,7 +6460,9 @@ sub isolate_dest_interface( $$$$ ) {
|
|||||||
$diface = $1;
|
$diface = $1;
|
||||||
$dnets = $2;
|
$dnets = $2;
|
||||||
} elsif ( $dest =~ /:/ ) {
|
} elsif ( $dest =~ /:/ ) {
|
||||||
if ( $dest =~ /^<(.+)>$/ || $dest =~ /^\[(.+)\]$/ ) {
|
if ( $dest =~ /^\[(?:.+)\],\[(?:.+)\]$/ ){
|
||||||
|
$dnets = $dest;
|
||||||
|
} elsif ( $dest =~ /^\[(.+)\]$/ ) {
|
||||||
$dnets = $1;
|
$dnets = $1;
|
||||||
} else {
|
} else {
|
||||||
$dnets = $dest;
|
$dnets = $dest;
|
||||||
@ -6457,6 +6472,7 @@ sub isolate_dest_interface( $$$$ ) {
|
|||||||
} else {
|
} else {
|
||||||
$diface = $dest;
|
$diface = $dest;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
( $diface, $dnets, $rule );
|
( $diface, $dnets, $rule );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user