multiwan package: use less iptables -F
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 7 Mar 2012 11:47:52 +0000 (11:47 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 7 Mar 2012 11:47:52 +0000 (11:47 +0000)
Hi

Even if "qos-scripts" package isn't installed, multiwan is flushing all the mangle chains.
This patch correct this behavior to let people use mangle table if qos-scripts is not there (to use there own qos script ...)

Info: For the moment the qos management of the multiwan package is broken (it's speaks about IMQ, instead of IFB)

The package version go from 1.0.20 to 1.0.21 (and not 1.0.19) because there is this patch also pending (http://patchwork.openwrt.org/patch/1740/)

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>
SVN-Revision: 30833

net/multiwan/Makefile
net/multiwan/files/usr/bin/multiwan

index 76c61d83b58a407bb31e3498759a1a3bdfe082ee..bed8e6f63d748681319b01641682b2c26f0e8896 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=multiwan
-PKG_VERSION:=1.0.20
+PKG_VERSION:=1.0.21
 PKG_RELEASE:=1
 
 include $(INCLUDE_DIR)/package.mk
index c2fb3ab26e64f57382de7c0bb3a4931a4ed6fa0f..75b2a2fc8348eb3f82ce53e403ebe7e01d606b80 100755 (executable)
@@ -257,10 +257,10 @@ clear_rules() {
     local restore_single=$1
     local group 
 
-    iptables -t mangle -F PREROUTING 
-    iptables -t mangle -F FORWARD
-    iptables -t mangle -F POSTROUTING
-    iptables -t mangle -F OUTPUT
+    iptables -t mangle -D PREROUTING -j MultiWan
+    iptables -t mangle -D FORWARD -j MultiWan
+    iptables -t mangle -D OUTPUT -j MultiWan
+    iptables -t mangle -D POSTROUTING -j MultiWan
     iptables -t mangle -F MultiWan
     iptables -t mangle -X MultiWan
     iptables -t mangle -F MultiWanRules
@@ -285,6 +285,10 @@ clear_rules() {
     done
 
     if [ ! -z "$CHKFORQOS" ]; then
+       iptables -t mangle -F PREROUTING
+       iptables -t mangle -F FORWARD
+       iptables -t mangle -F OUTPUT
+       iptables -t mangle -F POSTROUTING
        iptables -t mangle -F MultiWanQoS
        iptables -t mangle -X MultiWanQoS