mwan3: update to version 2.0-1

Fix issue with sticky sessions not working correctly
Fix issue where user created ipsets were not applied

Signed-off-by: Jeroen Louwes <jeroen.louwes@gmail.com>
This commit is contained in:
Jeroen Louwes
2015-12-17 11:50:18 +01:00
parent fc2a2dadb1
commit 725cfe6b8e
5 changed files with 93 additions and 145 deletions
+21 -8
View File
@@ -1,5 +1,14 @@
#!/bin/sh
. /lib/functions.sh
. /lib/functions/network.sh
. /lib/mwan3/mwan3.sh
config_load mwan3
config_get enabled $INTERFACE enabled 0
[ "$enabled" == "1" ] || exit 0
[ "$ACTION" == "ifup" -o "$ACTION" == "ifdown" ] || exit 1
[ -n "$INTERFACE" ] || exit 2
@@ -13,14 +22,17 @@ fi
[ -x /usr/sbin/ip6tables ] || exit 7
[ -x /usr/bin/logger ] || exit 8
. /lib/functions.sh
. /lib/functions/network.sh
. /lib/mwan3/mwan3.sh
local family gateway
config_load mwan3
config_get family $INTERFACE family ipv4
config_get enabled $INTERFACE enabled 0
[ "$enabled" == "1" ] || exit 0
if [ "$family" == "ipv4" ]; then
network_get_gateway gateway $INTERFACE
elif [ "$family" == "ipv6" ]; then
network_get_gateway6 gateway $INTERFACE
fi
[ -n "$gateway" ] || exit 9
$LOG notice "$ACTION interface $INTERFACE (${DEVICE:-unknown})"
@@ -34,6 +46,7 @@ case "$ACTION" in
mwan3_create_iface_iptables $INTERFACE $DEVICE
mwan3_create_iface_route $INTERFACE $DEVICE
mwan3_track $INTERFACE $DEVICE
mwan3_set_policies_iptables
mwan3_set_user_rules
;;
ifdown)
@@ -41,9 +54,9 @@ case "$ACTION" in
mwan3_delete_iface_iptables $INTERFACE
mwan3_delete_iface_route $INTERFACE
mwan3_delete_iface_ipset_entries $INTERFACE
mwan3_set_policies_iptables
mwan3_set_user_rules
;;
esac
config_foreach mwan3_create_policies_iptables policy
exit 0