From 6d56abe9534aaca2a4f57d14f23a003dc5786321 Mon Sep 17 00:00:00 2001 From: dave14305 <44532942+dave14305@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:21:32 -0400 Subject: [PATCH] Avoid crashes with Adaptive QoS on newer routers 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. --- spdmerlin.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/spdmerlin.sh b/spdmerlin.sh index 918a6cf..8eb6b57 100644 --- a/spdmerlin.sh +++ b/spdmerlin.sh @@ -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 @@ -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