]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
firewall: Always restore all connection marks
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 4 Oct 2021 17:52:19 +0000 (18:52 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 13 Oct 2021 11:46:23 +0000 (11:46 +0000)
This was done by tc only when QoS was enabled

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/qos/makeqosscripts.pl
src/initscripts/system/firewall

index 3af046ac3b69a49cc6333e72d747bd6cbc974eec..5bdd5b811a9a6d35581aac199f1312e87f7e998d 100644 (file)
@@ -370,7 +370,6 @@ print <<END
        ip link set $qossettings{'IMQ_DEV'} up
 
        tc filter add dev $qossettings{'RED_DEV'} parent ffff: protocol all u32 match u32 0 0 \\
-               action connmark \\
                action mirred egress redirect dev $qossettings{'IMQ_DEV'}
 
        ### ADD HTB QDISC FOR $qossettings{'IMQ_DEV'}
index 9d023a349b98b3752608e41fcc71eeeb846fe43b..7a7d52d577b9f55ae2a6e004083d2794b3a05cb0 100644 (file)
@@ -100,6 +100,9 @@ iptables_init() {
        iptables -t raw -N CONNTRACK
        iptables -t raw -A PREROUTING -j CONNTRACK
 
+       # Restore any connection marks
+       iptables -t mangle -A PREROUTING -j CONNMARK --restore-mark
+
        # Fix for braindead ISPs
        iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu