mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-22 13:39:06 +01:00
Handle PROTO '-' in conntrack file processing.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
4e5b98d3d9
commit
6f82bfe7d1
@ -138,10 +138,12 @@ sub process_conntrack_rule( $$$$$$$$$$ ) {
|
||||
|
||||
require_capability 'CT_TARGET', 'CT entries in the conntrack file', '';
|
||||
|
||||
if ( $proto =~ s/:all$// ) {
|
||||
fatal_error '":all" may only be used with TCP' unless resolve_proto( $proto ) == TCP;
|
||||
} else {
|
||||
$proto = TCP . ':syn' if $proto !~ /:syn/ && resolve_proto( $proto ) == TCP;
|
||||
if ( $proto ne '-' ) {
|
||||
if ( $proto =~ s/:all$// ) {
|
||||
fatal_error '":all" may only be used with TCP' unless resolve_proto( $proto ) == TCP;
|
||||
} else {
|
||||
$proto = TCP . ':syn' if $proto !~ /:syn/ && resolve_proto( $proto ) == TCP;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $option eq 'notrack' ) {
|
||||
|
Loading…
Reference in New Issue
Block a user