]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
suricata: Use correct red device when using QMI
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 18 Aug 2024 09:15:31 +0000 (11:15 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 18 Aug 2024 12:46:14 +0000 (12:46 +0000)
When using QMI the dial-in option has to be set to "ppp" during setup.

In this case the initscript of suricata will create all related firewall
rules for the ppp0 interface which is not correct when using QMI where
the RED device is called red0.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/system/suricata

index 938ea66de6ccb55388bbf334455b10ddc58ac478..79f9478c38520f3826c319289a2c139bef4934b1 100644 (file)
@@ -86,7 +86,7 @@ function generate_fw_rules {
                # Check if the IDS is enabled for this network zone.
                if [ "${!enable_ids_zone}" == "on" ]; then
                        # Check if the current processed zone is "red" and the configured type is PPPoE dialin.
-                       if [ "$zone" == "red" ] && [ "$RED_TYPE" == "PPPOE" ]; then
+                       if [ "$zone" == "red" ] && [ "$RED_TYPE" == "PPPOE" ] && [ "$RED_DRIVER" != "qmi_wwan" ]; then
                                # Set device name to ppp0.
                                network_device="ppp0"
                        elif [ "$zone" == "ovpn" ]; then