[1/9] suricata: Set most significant bit as repeat marker

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

Commit Message

Michael Tremer Oct. 18, 2021, 10:10 a.m. UTC
  I have no idea why some odd value was chosen here, but one bit should be
enough.

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

Comments

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

> I have no idea why some odd value was chosen here, but one bit should be
> enough.
> 
> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
> ---
>  config/suricata/suricata.yaml   | 4 ++--
>  src/initscripts/system/suricata | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/config/suricata/suricata.yaml b/config/suricata/suricata.yaml
> index 4e9e39967..1ce013dc7 100644
> --- a/config/suricata/suricata.yaml
> +++ b/config/suricata/suricata.yaml
> @@ -346,8 +346,8 @@ logging:
>  
>  nfq:
>     mode: repeat
> -   repeat-mark: 1879048192
> -   repeat-mask: 1879048192
> +   repeat-mark: 2147483648
> +   repeat-mask: 2147483648
>  #   bypass-mark: 1
>  #   bypass-mask: 1
>  #  route-queue: 2
> diff --git a/src/initscripts/system/suricata b/src/initscripts/system/suricata
> index 33633ddf9..e327225d7 100644
> --- a/src/initscripts/system/suricata
> +++ b/src/initscripts/system/suricata
> @@ -35,8 +35,8 @@ network_zones=( red green blue orange ovpn )
>  enabled_ips_zones=()
>  
>  # Mark and Mask options.
> -MARK="0x70000000"
> -MASK="0x70000000"
> +MARK="0x80000000"
> +MASK="0x80000000"
>  
>  # PID file of suricata.
>  PID_FILE="/var/run/suricata.pid"
>
  
Stefan Schantl Oct. 19, 2021, 4:02 a.m. UTC | #2
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
> I have no idea why some odd value was chosen here, but one bit should
> be
> enough.
> 
> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
> ---
>  config/suricata/suricata.yaml   | 4 ++--
>  src/initscripts/system/suricata | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/config/suricata/suricata.yaml
> b/config/suricata/suricata.yaml
> index 4e9e39967..1ce013dc7 100644
> --- a/config/suricata/suricata.yaml
> +++ b/config/suricata/suricata.yaml
> @@ -346,8 +346,8 @@ logging:
>  
>  nfq:
>     mode: repeat
> -   repeat-mark: 1879048192
> -   repeat-mask: 1879048192
> +   repeat-mark: 2147483648
> +   repeat-mask: 2147483648
>  #   bypass-mark: 1
>  #   bypass-mask: 1
>  #  route-queue: 2
> diff --git a/src/initscripts/system/suricata
> b/src/initscripts/system/suricata
> index 33633ddf9..e327225d7 100644
> --- a/src/initscripts/system/suricata
> +++ b/src/initscripts/system/suricata
> @@ -35,8 +35,8 @@ network_zones=( red green blue orange ovpn )
>  enabled_ips_zones=()
>  
>  # Mark and Mask options.
> -MARK="0x70000000"
> -MASK="0x70000000"
> +MARK="0x80000000"
> +MASK="0x80000000"
>  
>  # PID file of suricata.
>  PID_FILE="/var/run/suricata.pid"
  

Patch

diff --git a/config/suricata/suricata.yaml b/config/suricata/suricata.yaml
index 4e9e39967..1ce013dc7 100644
--- a/config/suricata/suricata.yaml
+++ b/config/suricata/suricata.yaml
@@ -346,8 +346,8 @@  logging:
 
 nfq:
    mode: repeat
-   repeat-mark: 1879048192
-   repeat-mask: 1879048192
+   repeat-mark: 2147483648
+   repeat-mask: 2147483648
 #   bypass-mark: 1
 #   bypass-mask: 1
 #  route-queue: 2
diff --git a/src/initscripts/system/suricata b/src/initscripts/system/suricata
index 33633ddf9..e327225d7 100644
--- a/src/initscripts/system/suricata
+++ b/src/initscripts/system/suricata
@@ -35,8 +35,8 @@  network_zones=( red green blue orange ovpn )
 enabled_ips_zones=()
 
 # Mark and Mask options.
-MARK="0x70000000"
-MASK="0x70000000"
+MARK="0x80000000"
+MASK="0x80000000"
 
 # PID file of suricata.
 PID_FILE="/var/run/suricata.pid"