Prevent invalid code generation with SNAT(detect)

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2018-10-02 08:15:20 -07:00
parent aaa80882a0
commit 9f3cc88cf0
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -5574,6 +5574,15 @@ sub process_snat1( $$$$$$$$$$$$ ) {
$chainref = $interface ? ensure_chain('nat', $pre_nat ? snat_chain $interface : masq_chain $interface) : $nat_table->{INPUT};
}
if ( $chainref->{complete} ) {
if ( $interface ) {
warning_message( "Interface $interface entry generated no $toolname rule" );
} else {
warning_message( "Entry generated no $toolname rule" );
}
next;
}
$baserule .= do_condition( $condition , $chainref->{name} );
#
# Handle IPSEC options, if any