mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 19:51:40 +02:00
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:
parent
27c5e67632
commit
75fb164234
@ -2706,48 +2706,50 @@ sub perl_action_tcp_helper($$) {
|
|||||||
my $action = $actparms{action};
|
my $action = $actparms{action};
|
||||||
my $chainref = $actparms{0};
|
my $chainref = $actparms{0};
|
||||||
my $result;
|
my $result;
|
||||||
|
my $passedproto = $columns[2];
|
||||||
|
|
||||||
assert( $chainref );
|
assert( $chainref );
|
||||||
|
|
||||||
if ( $inlines{$action} ) {
|
if ( $passedproto eq '-' || $passedproto eq 'tcp' || $passedproto eq '6' ) {
|
||||||
my $passedproto = $columns[2];
|
#
|
||||||
|
# For other protos, a 'no rule generated' warning will be issued
|
||||||
fatal_error "Invalid PROTO ($passedproto) for the $action action" unless $passedproto eq '-' || $passedproto eq 'tcp' || $passedproto eq '6';
|
#
|
||||||
|
if ( $inlines{$action} ) {
|
||||||
$result = &process_rule( $chainref,
|
$result = &process_rule( $chainref,
|
||||||
$proto,
|
$proto,
|
||||||
$target,
|
$target,
|
||||||
'',
|
'',
|
||||||
@columns[0,1],
|
@columns[0,1],
|
||||||
'-',
|
'-',
|
||||||
@columns[3..14]
|
@columns[3..14]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$result = process_rule( $chainref,
|
$result = process_rule( $chainref,
|
||||||
$proto,
|
$proto,
|
||||||
$target,
|
$target,
|
||||||
'', # Current Param
|
'', # Current Param
|
||||||
'-', # Source
|
'-', # Source
|
||||||
'-', # Dest
|
'-', # Dest
|
||||||
"-", # Proto
|
"-", # Proto
|
||||||
'-', # Port(s)
|
'-', # Port(s)
|
||||||
'-', # Source Port(s)
|
'-', # Source Port(s)
|
||||||
'-', # Original Dest
|
'-', # Original Dest
|
||||||
'-', # Rate Limit
|
'-', # Rate Limit
|
||||||
'-', # User
|
'-', # User
|
||||||
'-', # Mark
|
'-', # Mark
|
||||||
'-', # Connlimit
|
'-', # Connlimit
|
||||||
'-', # Time
|
'-', # Time
|
||||||
'-', # Headers,
|
'-', # Headers,
|
||||||
'-', # condition,
|
'-', # condition,
|
||||||
'-', # helper,
|
'-', # helper,
|
||||||
0, # Wildcard
|
0, # Wildcard
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# Record that we generated a rule to avoid bogus warning
|
||||||
|
#
|
||||||
|
$actionresult ||= $result;
|
||||||
}
|
}
|
||||||
#
|
|
||||||
# Record that we generated a rule to avoid bogus warning
|
|
||||||
#
|
|
||||||
$actionresult ||= $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user