From 35d05cfebe36b178e2966a2650812280e0508c90 Mon Sep 17 00:00:00 2001 From: Adze1502 Date: Tue, 12 Aug 2014 21:17:54 +0200 Subject: [PATCH] mwan3: Update to version 1.5-2 Fix issue icmp unreachables go out wrong interface Remove unnecessary line Signed-off-by: Jeroen Louwes --- net/mwan3/Makefile | 8 ++++---- net/mwan3/files/etc/hotplug.d/iface/15-mwan3 | 15 +++++++-------- net/mwan3/files/usr/sbin/mwan3 | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/net/mwan3/Makefile b/net/mwan3/Makefile index 673fd908b..71b59e62e 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:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=Jeroen Louwes PKG_LICENSE:=GPLv2 @@ -26,9 +26,9 @@ define Package/mwan3 endef define Package/mwan3/description - Hotplug script which makes configuration of multiple WAN interfaces simple - and manageable. With loadbalancing/failover support for up to 250 wan - interfaces, connection tracking and an easy to manage traffic ruleset. +Hotplug script which makes configuration of multiple WAN interfaces simple +and manageable. With loadbalancing/failover support for up to 250 wan +interfaces, connection tracking and an easy to manage traffic ruleset. endef define Package/mwan3/conffiles diff --git a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 b/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 index 8a0878f37..d425b6c44 100644 --- a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 +++ b/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 @@ -29,8 +29,9 @@ mwan3_set_general_iptables() $IPT -A mwan3_hook -j CONNMARK --save-mark --nfmask 0xff00 --ctmask 0xff00 fi - if ! $IPT -S mwan3_track_hook &> /dev/null; then - $IPT -N mwan3_track_hook + if ! $IPT -S mwan3_output_hook &> /dev/null; then + $IPT -N mwan3_output_hook + $IPT -A mwan3_output_hook -p icmp -m icmp --icmp-type 3 -j MARK --set-xmark 0xff00/0xff00 fi if ! $IPT -S PREROUTING | grep mwan3_hook &> /dev/null; then @@ -41,8 +42,8 @@ mwan3_set_general_iptables() $IPT -A OUTPUT -j mwan3_hook fi - if ! $IPT -S OUTPUT | grep mwan3_track_hook &> /dev/null; then - $IPT -A OUTPUT -j mwan3_track_hook + if ! $IPT -S OUTPUT | grep mwan3_output_hook &> /dev/null; then + $IPT -A OUTPUT -j mwan3_output_hook fi $IPT -F mwan3_rules @@ -140,7 +141,7 @@ mwan3_track() if ! $IPT -S mwan3_track_$INTERFACE &> /dev/null; then $IPT -N mwan3_track_$INTERFACE - $IPT -A mwan3_track_hook -p icmp -m icmp --icmp-type 8 -m length --length 32 -j mwan3_track_$INTERFACE + $IPT -A mwan3_output_hook -p icmp -m icmp --icmp-type 8 -m length --length 32 -j mwan3_track_$INTERFACE fi $IPT -F mwan3_track_$INTERFACE @@ -151,7 +152,7 @@ mwan3_track() [ -x /usr/sbin/mwan3track ] && /usr/sbin/mwan3track $INTERFACE $DEVICE $reliability $count $timeout $interval $down $up $track_ips & else - $IPT -D mwan3_track_hook -p icmp -m icmp --icmp-type 8 -m length --length 32 -j mwan3_track_$INTERFACE &> /dev/null + $IPT -D mwan3_output_hook -p icmp -m icmp --icmp-type 8 -m length --length 32 -j mwan3_track_$INTERFACE &> /dev/null $IPT -F mwan3_track_$INTERFACE &> /dev/null $IPT -X mwan3_track_$INTERFACE &> /dev/null fi @@ -223,8 +224,6 @@ mwan3_set_policies_iptables() total_weight=0 config_list_foreach $policy use_member mwan3_set_policy - - $IPT -X $policy &> /dev/null } mwan3_set_user_rules_iptables() diff --git a/net/mwan3/files/usr/sbin/mwan3 b/net/mwan3/files/usr/sbin/mwan3 index 3bda73f11..310272850 100755 --- a/net/mwan3/files/usr/sbin/mwan3 +++ b/net/mwan3/files/usr/sbin/mwan3 @@ -190,7 +190,7 @@ stop() $IPT -D PREROUTING -j mwan3_hook &> /dev/null $IPT -D OUTPUT -j mwan3_hook &> /dev/null - $IPT -D OUTPUT -j mwan3_track_hook &> /dev/null + $IPT -D OUTPUT -j mwan3_output_hook &> /dev/null for table in $($IPT -S | awk '{print $2}' | grep mwan3 | sort -u); do $IPT -F $table &> /dev/null