Modify

Opened 10 years ago

Last modified 3 years ago

#3783 new defect

qos-scripts X wifidog: do not work together

Reported by: openwrt@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version:
Keywords: Cc:

Description

Both uses firewall rules to work. Both uses the same netfilter MARK number (conflict).
qos-scripts use "iptables -t mangle -F" in stop an start! It's destroy the wifidog rules (and any mangle rules).

Attachments (0)

Change History (9)

comment:1 follow-up: Changed 9 years ago by florian

Which one do you propose we patch ?

comment:2 in reply to: ↑ 1 ; follow-up: Changed 9 years ago by anonymous

Replying to florian:

Which one do you propose we patch ?

Thanks, florian!

I propose that QoS Script use an script (star/stop) with "iptables -t mangle -D ..." rules, and not

"iptables -t mangle -F"
If you save the start iptables script, you can do 's/-A/-D/' and apply in stop
So, the numbers used in the MARKs, must be choice in config. If we can choice the fist number of sequence, we can avoid conflit with wifidog MARKs.

TIA
--
Marcos Tadeu

comment:3 in reply to: ↑ 2 Changed 9 years ago by daniel@…

Did this work ok? I'm using Kamikaze 8.9 and the standard QoS package is still incompatible with wifidog. Any insight is appreciated!

Replying to anonymous:

Replying to florian:

Which one do you propose we patch ?

Thanks, florian!

I propose that QoS Script use an script (star/stop) with "iptables -t mangle -D ..." rules, and not

"iptables -t mangle -F"
If you save the start iptables script, you can do 's/-A/-D/' and apply in stop
So, the numbers used in the MARKs, must be choice in config. If we can choice the fist number of sequence, we can avoid conflit with wifidog MARKs.

TIA
--
Marcos Tadeu

comment:4 Changed 9 years ago by AaronZ@…

Any updates on this?

I am trying to throttle my WAPs that use WiFiDog and this working would be a good thing.

Aaron Z

comment:5 Changed 8 years ago by gspiliot

I have patched the generate.sh file from the qos-package as follows to "mask" the marking bits by 15 (0xf). This makes qos-scripts compatible with nodogsplash that I am using (which is derived from the wifi-dog codebase so the patch should work with wifi dog). This gives a headroom of 15 distinct markings for qos which were enough for me.

--- generate.sh.orig    2010-06-03 01:00:06.133574101 +0300
+++ generate.sh 2010-06-03 01:01:34.696039858 +0300
@@ -53,8 +53,8 @@
        done
        config_get type "$section" TYPE
        case "$type" in
-               classify) unset pkt; append "$var" "-m mark --mark 0";;
-               default) pkt=1; append "$var" "-m mark --mark 0";;
+               classify) unset pkt; append "$var" "-m mark --mark 0/15";;
+               default) pkt=1; append "$var" "-m mark --mark 0/15";;
                reclassify) pkt=1;;
        esac
        append "$var" "${proto:+-p $proto}"
@@ -161,8 +161,8 @@
                                config_get class "${value##!}" classnr
                                [ -z "$class" ] && continue;
                                case "$value" in
-                                       !*) append "$var" "-m mark ! --mark $class";;
-                                       *) append "$var" "-m mark --mark $class";;
+                                       !*) append "$var" "-m mark ! --mark $class/15";;
+                                       *) append "$var" "-m mark --mark $class/15";;
                                esac
                        ;;
                        1:TOS)
@@ -370,7 +370,7 @@
                        unset iptrule
                }

-               parse_matching_rule iptrule "$rule" "$options" "$prefix" "-j MARK --set-mark $target"
+               parse_matching_rule iptrule "$rule" "$options" "$prefix" "-j MARK --set-mark $target/15"
                append "$var" "$iptrule" "$N"
        done
 }
@@ -389,7 +389,7 @@
                config_get maxsize "$class" maxsize
                [ -z "$maxsize" -o -z "$mark" ] || {
                        add_insmod ipt_length
-                       append pktrules "iptables -t mangle -A ${cg} -m mark --mark $mark -m length --length $maxsize: -j MARK --set-mark 0" "$N"
+                       append pktrules "iptables -t mangle -A ${cg} -m mark --mark $mark/15 -m length --length $maxsize: -j MARK --set-mark 0/15" "$N"
                }
        done
        add_rules pktrules "$rules" "iptables -t mangle -A ${cg}"
@@ -415,9 +415,9 @@
 $INSMOD
 iptables -t mangle -N ${cg} >&- 2>&-
 iptables -t mangle -N ${cg}_ct >&- 2>&-
-${iptrules:+${iptrules}${N}iptables -t mangle -A ${cg}_ct -j CONNMARK --save-mark}
-iptables -t mangle -A ${cg} -j CONNMARK --restore-mark
-iptables -t mangle -A ${cg} -m mark --mark 0 -j ${cg}_ct
+${iptrules:+${iptrules}${N}iptables -t mangle -A ${cg}_ct -j CONNMARK --save-mark --mask 15}
+iptables -t mangle -A ${cg} -j CONNMARK --restore-mark --mask 15
+iptables -t mangle -A ${cg} -m mark --mark 0/15 -j ${cg}_ct
 $pktrules
 $up$N${down:+${down}$N}
 EOF

comment:6 Changed 7 years ago by rich@…

I wasn't able to get gspilot's mod to generate.sh to work on WiFiDog. Anyone else try?

--r

comment:7 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:8 Changed 3 years ago by anonymous

any idea?

comment:9 Changed 3 years ago by anonymous

how can I fix this problem?
thanks

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.