Fix ORIGINAL DEST issue

This commit is contained in:
Tom Eastep 2009-06-15 08:45:34 -07:00
parent f723bc2ef1
commit 440cc08802

View File

@ -1293,10 +1293,12 @@ sub process_rule1 ( $$$$$$$$$$$$$ ) {
$loglevel = '';
}
unless ( $origdest eq '-' ) {
require_capability( 'CONNTRACK_MATCH', 'ORIGINAL DEST in a non-NAT rule', 's' ) unless $actiontype & NATRULE;
} else {
$origdest = '';
if ( $origdest ) {
unless ( $origdest eq '-' ) {
require_capability( 'CONNTRACK_MATCH', 'ORIGINAL DEST in a non-NAT rule', 's' ) unless $actiontype & NATRULE;
} else {
$origdest = '';
}
}
$rule .= "-m conntrack --ctorigdstport $origdstports " if $capabilities{NEW_CONNTRACK_MATCH} && $origdstports;