Prevent 'nat' and 'mangle' being specified together

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-10-18 15:32:05 -07:00
parent c92ebc3908
commit ab496987e0
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -2258,7 +2258,11 @@ sub process_actions() {
fatal_error "The 'raw' table may not be specified for non-builtin actions" if $opts & RAW_OPT;
$type |= MANGLE_TABLE if $opts & MANGLE_OPT;
$type |= NAT_TABLE if $opts & NAT_OPT;
if ( $opts & NAT_OPT ) {
fatal_error q(The 'mangle' and 'nat' options are mutually exclusive) if $opts & MANGLE_OPT;
$type |= NAT_TABLE;
}
my $actionfile = find_file( "action.$action" );