Browse Source

Merge pull request #196 from Adze1502/master

mwan3: update to version 1.5-2
lilik-openwrt-22.03
sbyx 10 years ago
parent
commit
7f8b73e7d9
3 changed files with 12 additions and 13 deletions
  1. +4
    -4
      net/mwan3/Makefile
  2. +7
    -8
      net/mwan3/files/etc/hotplug.d/iface/15-mwan3
  3. +1
    -1
      net/mwan3/files/usr/sbin/mwan3

+ 4
- 4
net/mwan3/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=mwan3 PKG_NAME:=mwan3
PKG_VERSION:=1.5 PKG_VERSION:=1.5
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_MAINTAINER:=Jeroen Louwes <jeroen.louwes@gmail.com> PKG_MAINTAINER:=Jeroen Louwes <jeroen.louwes@gmail.com>
PKG_LICENSE:=GPLv2 PKG_LICENSE:=GPLv2
@ -26,9 +26,9 @@ define Package/mwan3
endef endef
define Package/mwan3/description 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 endef
define Package/mwan3/conffiles define Package/mwan3/conffiles


+ 7
- 8
net/mwan3/files/etc/hotplug.d/iface/15-mwan3 View File

@ -29,8 +29,9 @@ mwan3_set_general_iptables()
$IPT -A mwan3_hook -j CONNMARK --save-mark --nfmask 0xff00 --ctmask 0xff00 $IPT -A mwan3_hook -j CONNMARK --save-mark --nfmask 0xff00 --ctmask 0xff00
fi 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 fi
if ! $IPT -S PREROUTING | grep mwan3_hook &> /dev/null; then if ! $IPT -S PREROUTING | grep mwan3_hook &> /dev/null; then
@ -41,8 +42,8 @@ mwan3_set_general_iptables()
$IPT -A OUTPUT -j mwan3_hook $IPT -A OUTPUT -j mwan3_hook
fi 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 fi
$IPT -F mwan3_rules $IPT -F mwan3_rules
@ -140,7 +141,7 @@ mwan3_track()
if ! $IPT -S mwan3_track_$INTERFACE &> /dev/null; then if ! $IPT -S mwan3_track_$INTERFACE &> /dev/null; then
$IPT -N mwan3_track_$INTERFACE $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 fi
$IPT -F mwan3_track_$INTERFACE $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 & [ -x /usr/sbin/mwan3track ] && /usr/sbin/mwan3track $INTERFACE $DEVICE $reliability $count $timeout $interval $down $up $track_ips &
else 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 -F mwan3_track_$INTERFACE &> /dev/null
$IPT -X mwan3_track_$INTERFACE &> /dev/null $IPT -X mwan3_track_$INTERFACE &> /dev/null
fi fi
@ -223,8 +224,6 @@ mwan3_set_policies_iptables()
total_weight=0 total_weight=0
config_list_foreach $policy use_member mwan3_set_policy config_list_foreach $policy use_member mwan3_set_policy
$IPT -X $policy &> /dev/null
} }
mwan3_set_user_rules_iptables() mwan3_set_user_rules_iptables()


+ 1
- 1
net/mwan3/files/usr/sbin/mwan3 View File

@ -190,7 +190,7 @@ stop()
$IPT -D PREROUTING -j mwan3_hook &> /dev/null $IPT -D PREROUTING -j mwan3_hook &> /dev/null
$IPT -D OUTPUT -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 for table in $($IPT -S | awk '{print $2}' | grep mwan3 | sort -u); do
$IPT -F $table &> /dev/null $IPT -F $table &> /dev/null


Loading…
Cancel
Save