PKG_NAME:=mwan3
PKG_VERSION:=1.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Jeroen Louwes <jeroen.louwes@gmail.com>
PKG_LICENSE:=GPLv2
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
$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
$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
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
[ -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
total_weight=0
config_list_foreach $policy use_member mwan3_set_policy
-
- $IPT -X $policy &> /dev/null
}
mwan3_set_user_rules_iptables()
$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