From: Adze1502 <jeroen.louwes@gmail.com>
Date: Tue, 9 Sep 2014 09:20:02 +0000 (+0200)
Subject: mwan3: update to version 1.5-4
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=5a6a54e37799c71ced82bf16362480cc65bf1e92;p=feed%2Fpackages.git

mwan3: update to version 1.5-4

Fix issue with more than one link route on a wan interface

Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
---

diff --git a/net/mwan3/Makefile b/net/mwan3/Makefile
index 8705950dc3..73855e67bc 100644
--- a/net/mwan3/Makefile
+++ b/net/mwan3/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mwan3
 PKG_VERSION:=1.5
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 PKG_MAINTAINER:=Jeroen Louwes <jeroen.louwes@gmail.com>
 PKG_LICENSE:=GPLv2
 
diff --git a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 b/net/mwan3/files/etc/hotplug.d/iface/15-mwan3
index ab2cd745ba..08316cf2e3 100644
--- a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3
+++ b/net/mwan3/files/etc/hotplug.d/iface/15-mwan3
@@ -69,7 +69,7 @@ mwan3_set_iface_iptables()
 {
 	local local_net local_nets
 
-	local_net=$($IP route list dev $DEVICE scope link | awk '{print $1}' | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}')
+	local_nets=$($IP route list dev $DEVICE scope link | awk '{print $1}' | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}')
 
 	if ! $IPT -S mwan3_iface_$INTERFACE &> /dev/null; then
 		$IPT -N mwan3_iface_$INTERFACE
@@ -79,10 +79,10 @@ mwan3_set_iface_iptables()
 	$IPT -D mwan3_ifaces -i $DEVICE -m mark --mark 0x0/0xff00 -j mwan3_iface_$INTERFACE &> /dev/null
 
 	if [ $ACTION == "ifup" ]; then
-		if [ -n "$local_net" ]; then
-			for local_nets in $local_net ; do
+		if [ -n "$local_nets" ]; then
+			for local_net in $local_nets ; do
 				if [ $ACTION == "ifup" ]; then
-					$IPT -I mwan3_iface_$INTERFACE -s $local_net -m mark --mark 0x0/0xff00 -m comment --comment "$INTERFACE" -j MARK --set-xmark 0xff00/0xff00
+					$IPT -I mwan3_iface_$INTERFACE -s $local_net -m mark --mark 0x0/0xff00 -m comment --comment "default" -j MARK --set-xmark 0xff00/0xff00
 				fi
 			done
 		fi