Browse Source

Merge pull request #1877 from Adze1502/master

mwan3: update to version 1.6-3
lilik-openwrt-22.03
Steven Barth 9 years ago
parent
commit
37c706907b
3 changed files with 58 additions and 24 deletions
  1. +1
    -1
      net/mwan3/Makefile
  2. +36
    -19
      net/mwan3/files/etc/hotplug.d/iface/15-mwan3
  3. +21
    -4
      net/mwan3/files/usr/sbin/mwan3

+ 1
- 1
net/mwan3/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=mwan3
PKG_VERSION:=1.6
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_MAINTAINER:=Jeroen Louwes <jeroen.louwes@gmail.com>
PKG_LICENSE:=GPLv2


+ 36
- 19
net/mwan3/files/etc/hotplug.d/iface/15-mwan3 View File

@ -1,5 +1,41 @@
#!/bin/sh
local IP IPS IPT LOG
[ -n "$ACTION" ] || exit 0
[ -n "$INTERFACE" ] || exit 0
if [ $ACTION == "ifup" ]; then
[ -n "$DEVICE" ] || exit 0
fi
if [ -x /usr/sbin/ip ]; then
IP="/usr/sbin/ip -4"
elif [ -x /usr/bin/ip ]; then
IP="/usr/bin/ip -4"
else
exit 1
fi
if [ -x /usr/sbin/ipset ]; then
IPS="/usr/sbin/ipset"
else
exit 1
fi
if [ -x /usr/sbin/iptables ]; then
IPT="/usr/sbin/iptables -t mangle -w"
else
exit 1
fi
if [ -x /usr/bin/logger ]; then
LOG="/usr/bin/logger -t mwan3 -p"
else
exit 1
fi
mwan3_get_iface_id()
{
let iface_count++
@ -398,25 +434,6 @@ mwan3_ifupdown()
config_foreach mwan3_set_user_rules_iptables rule
}
[ -n "$ACTION" ] || exit 0
[ -n "$INTERFACE" ] || exit 0
if [ $ACTION == "ifup" ]; then
[ -n "$DEVICE" ] || exit 0
fi
[ -x /usr/sbin/ip ] || exit 1
[ -x /usr/sbin/ipset ] || exit 1
[ -x /usr/sbin/iptables ] || exit 1
[ -x /usr/bin/logger ] || exit 1
local IP IPS IPT LOG
IP="/usr/sbin/ip -4"
IPS="/usr/sbin/ipset"
IPT="/usr/sbin/iptables -t mangle -w"
LOG="/usr/bin/logger -t mwan3 -p"
case "$ACTION" in
ifup|ifdown)
mwan3_ifupdown


+ 21
- 4
net/mwan3/files/usr/sbin/mwan3 View File

@ -1,9 +1,26 @@
#!/bin/sh
. /lib/functions.sh
IP="/usr/sbin/ip -4"
IPS="/usr/sbin/ipset"
IPT="/usr/sbin/iptables -t mangle -w"
if [ -x /usr/sbin/ip ]; then
IP="/usr/sbin/ip -4"
elif [ -x /usr/bin/ip ]; then
IP="/usr/bin/ip -4"
else
exit 1
fi
if [ -x /usr/sbin/ipset ]; then
IPS="/usr/sbin/ipset"
else
exit 1
fi
if [ -x /usr/sbin/iptables ]; then
IPT="/usr/sbin/iptables -t mangle -w"
else
exit 1
fi
. /lib/functions.sh
help()
{


Loading…
Cancel
Save