Don't issue fatal error if a proto other than tcp is passed to a tcp-only inline

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-01-29 10:31:20 -08:00
parent 27c5e67632
commit 75fb164234

View File

@ -2706,14 +2706,15 @@ sub perl_action_tcp_helper($$) {
my $action = $actparms{action};
my $chainref = $actparms{0};
my $result;
my $passedproto = $columns[2];
assert( $chainref );
if ( $passedproto eq '-' || $passedproto eq 'tcp' || $passedproto eq '6' ) {
#
# For other protos, a 'no rule generated' warning will be issued
#
if ( $inlines{$action} ) {
my $passedproto = $columns[2];
fatal_error "Invalid PROTO ($passedproto) for the $action action" unless $passedproto eq '-' || $passedproto eq 'tcp' || $passedproto eq '6';
$result = &process_rule( $chainref,
$proto,
$target,
@ -2749,6 +2750,7 @@ sub perl_action_tcp_helper($$) {
#
$actionresult ||= $result;
}
}
#
# Helper functions for process_raw_rule(). That function deals with the ugliness of wildcard zones ('all' and 'any') and zone lists.