Fix expand_rule() handling of PREROUTING_RESTRICTION

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9547 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2009-02-26 21:46:03 +00:00
parent f911165e65
commit f801c7cbfc

View File

@ -2273,7 +2273,8 @@ sub expand_rule( $$$$$$$$$$$ )
if ( $dest ) {
if ( $dest eq '-' ) {
$dest = '';
} elsif ( ( $restriction & PREROUTE_RESTRICT ) && $dest =~ /^detect:(.*)$/ ) {
} elsif ( $restriction & PREROUTE_RESTRICT ) {
if ( $dest =~ /^detect:(.*)$/ ) {
#
# DETECT_DNAT_IPADDRS=Yes and we're generating the nat rule
#
@ -2303,6 +2304,9 @@ sub expand_rule( $$$$$$$$$$$ )
}
$dest = '';
} else {
fatal_error "A DESTINATION interface may not be specified in this rule";
}
} elsif ( $family == F_IPV4 ) {
if ( $dest =~ /^(.+?):(.+)$/ ) {
$diface = $1;