Catch case where a transformed rule jumps to its own chain

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-04-07 08:58:50 -07:00
parent ecd7261365
commit 87a9b95f73

View File

@ -1309,6 +1309,8 @@ sub push_rule( $$ ) {
my $complete = 0;
my $ruleref = transform_rule( $_[1], $complete );
fatal_error "Chain $chainref->{name} jumps to itself" if ( $ruleref->{target} || '' ) eq $chainref->{name};
set_irule_comment( $chainref, $ruleref );
$ruleref->{mode} = CMD_MODE if $ruleref->{cmdlevel} = $chainref->{cmdlevel};