Skip to content

Commit

Permalink
Avoid crashes with Adaptive QoS on newer routers
Browse files Browse the repository at this point in the history
Remove POSTROUTING rules as you really only need OUTPUT rules to capture the speedtest upload traffic originating from the router.

This avoids conflicts with newer routers where changing the packet mark after Adaptive QoS has classified the packet can cause the router to crash.
  • Loading branch information
dave14305 authored Jun 11, 2024
1 parent 2b53e16 commit 6d56abe
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions spdmerlin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1465,9 +1465,7 @@ Run_Speedtest(){
iptables "$ACTION" OUTPUT -p "$proto" -o "$(Get_Interface_From_Name WAN)" -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
iptables "$ACTION" OUTPUT -p "$proto" -o tun1+ -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
iptables -t mangle "$ACTION" OUTPUT -p "$proto" -o "$(Get_Interface_From_Name WAN)" -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
iptables -t mangle "$ACTION" POSTROUTING -p "$proto" -o "$(Get_Interface_From_Name WAN)" -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
iptables -t mangle "$ACTION" OUTPUT -p "$proto" -o tun1+ -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
iptables -t mangle "$ACTION" POSTROUTING -p "$proto" -o tun1+ -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
done
stoppedqos="true"
done
Expand Down Expand Up @@ -1712,9 +1710,7 @@ Run_Speedtest(){
iptables -D OUTPUT -p "$proto" -o "$(Get_Interface_From_Name WAN)" -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
iptables -D OUTPUT -p "$proto" -o tun1+ -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
iptables -t mangle -D OUTPUT -p "$proto" -o "$(Get_Interface_From_Name WAN)" -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
iptables -t mangle -D POSTROUTING -p "$proto" -o "$(Get_Interface_From_Name WAN)" -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
iptables -t mangle -D OUTPUT -p "$proto" -o tun1+ -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
iptables -t mangle -D POSTROUTING -p "$proto" -o tun1+ -j MARK --set-xmark 0x80000000/0xC0000000 2>/dev/null
done
elif [ "$(nvram get qos_enable)" -eq 1 ] && [ "$(nvram get qos_type)" -ne 1 ] && [ -f /tmp/qos ]; then
/tmp/qos start >/dev/null 2>&1
Expand Down

0 comments on commit 6d56abe

Please sign in to comment.