mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-26 17:43:15 +01:00
Move adjustment of the protocol in process_conntrack_rule()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
b42678269c
commit
46f68c6dcb
@ -91,7 +91,7 @@ sub process_conntrack_rule( $$$$$$$$$$ ) {
|
||||
|
||||
my $disposition = $action;
|
||||
my $exception_rule = '';
|
||||
my $rule = do_proto( $proto, $ports, $sports ) . do_user ( $user ) . do_condition( $switch , $chainref->{name} );
|
||||
|
||||
my $level = '';
|
||||
|
||||
if ( $action =~ /^(?:NFLOG|ULOG)/ ) {
|
||||
@ -138,6 +138,8 @@ sub process_conntrack_rule( $$$$$$$$$$ ) {
|
||||
|
||||
require_capability 'CT_TARGET', 'CT entries in the conntrack file', '';
|
||||
|
||||
$proto = TCP . ':syn' if $proto !~ /:syn$/ && resolve_proto( $proto ) == TCP;
|
||||
|
||||
if ( $option eq 'notrack' ) {
|
||||
fatal_error "Invalid conntrack ACTION ( $action )" if supplied $args;
|
||||
$action = 'CT --notrack';
|
||||
@ -199,7 +201,9 @@ sub process_conntrack_rule( $$$$$$$$$$ ) {
|
||||
expand_rule( $chainref ,
|
||||
$restriction ,
|
||||
'',
|
||||
$rule,
|
||||
do_proto( $proto, $ports, $sports ) .
|
||||
do_user ( $user ) .
|
||||
do_condition( $switch , $chainref->{name} ),
|
||||
$source ,
|
||||
$dest ,
|
||||
'' ,
|
||||
|
Loading…
Reference in New Issue
Block a user