[3/9] suricata: Define bypass mark

Message ID 20211018101022.15448-3-michael.tremer@ipfire.org
State Accepted
Commit 11f7218f9cd16b32b2cb4477355e0e5057df6399
Headers
Series [1/9] suricata: Set most significant bit as repeat marker |

Commit Message

Michael Tremer Oct. 18, 2021, 10:10 a.m. UTC
  Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 config/suricata/suricata.yaml   | 4 ++--
 src/initscripts/system/suricata | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
  

Comments

Peter Müller Oct. 18, 2021, 8:43 p.m. UTC | #1
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>

> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
> ---
>  config/suricata/suricata.yaml   | 4 ++--
>  src/initscripts/system/suricata | 2 ++
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/config/suricata/suricata.yaml b/config/suricata/suricata.yaml
> index 1ce013dc7..f02b93d76 100644
> --- a/config/suricata/suricata.yaml
> +++ b/config/suricata/suricata.yaml
> @@ -348,8 +348,8 @@ nfq:
>     mode: repeat
>     repeat-mark: 2147483648
>     repeat-mask: 2147483648
> -#   bypass-mark: 1
> -#   bypass-mask: 1
> +   bypass-mark: 1073741824
> +   bypass-mask: 1073741824
>  #  route-queue: 2
>  #  batchcount: 20
>     fail-open: yes
> diff --git a/src/initscripts/system/suricata b/src/initscripts/system/suricata
> index 111bd9df3..981471c7c 100644
> --- a/src/initscripts/system/suricata
> +++ b/src/initscripts/system/suricata
> @@ -37,6 +37,8 @@ enabled_ips_zones=()
>  # Mark and Mask options.
>  REPEAT_MARK="0x80000000"
>  REPEAT_MASK="0x80000000"
> +BYPASS_MARK="0x40000000"
> +BYPASS_MASK="0x40000000"
>  
>  # PID file of suricata.
>  PID_FILE="/var/run/suricata.pid"
>
  
Stefan Schantl Oct. 19, 2021, 4:03 a.m. UTC | #2
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
> ---
>  config/suricata/suricata.yaml   | 4 ++--
>  src/initscripts/system/suricata | 2 ++
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/config/suricata/suricata.yaml
> b/config/suricata/suricata.yaml
> index 1ce013dc7..f02b93d76 100644
> --- a/config/suricata/suricata.yaml
> +++ b/config/suricata/suricata.yaml
> @@ -348,8 +348,8 @@ nfq:
>     mode: repeat
>     repeat-mark: 2147483648
>     repeat-mask: 2147483648
> -#   bypass-mark: 1
> -#   bypass-mask: 1
> +   bypass-mark: 1073741824
> +   bypass-mask: 1073741824
>  #  route-queue: 2
>  #  batchcount: 20
>     fail-open: yes
> diff --git a/src/initscripts/system/suricata
> b/src/initscripts/system/suricata
> index 111bd9df3..981471c7c 100644
> --- a/src/initscripts/system/suricata
> +++ b/src/initscripts/system/suricata
> @@ -37,6 +37,8 @@ enabled_ips_zones=()
>  # Mark and Mask options.
>  REPEAT_MARK="0x80000000"
>  REPEAT_MASK="0x80000000"
> +BYPASS_MARK="0x40000000"
> +BYPASS_MASK="0x40000000"
>  
>  # PID file of suricata.
>  PID_FILE="/var/run/suricata.pid"
  

Patch

diff --git a/config/suricata/suricata.yaml b/config/suricata/suricata.yaml
index 1ce013dc7..f02b93d76 100644
--- a/config/suricata/suricata.yaml
+++ b/config/suricata/suricata.yaml
@@ -348,8 +348,8 @@  nfq:
    mode: repeat
    repeat-mark: 2147483648
    repeat-mask: 2147483648
-#   bypass-mark: 1
-#   bypass-mask: 1
+   bypass-mark: 1073741824
+   bypass-mask: 1073741824
 #  route-queue: 2
 #  batchcount: 20
    fail-open: yes
diff --git a/src/initscripts/system/suricata b/src/initscripts/system/suricata
index 111bd9df3..981471c7c 100644
--- a/src/initscripts/system/suricata
+++ b/src/initscripts/system/suricata
@@ -37,6 +37,8 @@  enabled_ips_zones=()
 # Mark and Mask options.
 REPEAT_MARK="0x80000000"
 REPEAT_MASK="0x80000000"
+BYPASS_MARK="0x40000000"
+BYPASS_MASK="0x40000000"
 
 # PID file of suricata.
 PID_FILE="/var/run/suricata.pid"