Browse Source

Merge pull request #14413 from aaronjg/bugfix/mwan3-ipv6-regression

mwan3: fix regression in ipv6 routing tables
lilik-openwrt-22.03
Etienne Champetier 4 years ago
committed by GitHub
parent
commit
9ef2e619b9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 12 additions and 21 deletions
  1. +1
    -1
      net/mwan3/Makefile
  2. +2
    -3
      net/mwan3/files/etc/hotplug.d/iface/15-mwan3
  3. +0
    -2
      net/mwan3/files/etc/init.d/mwan3
  4. +6
    -4
      net/mwan3/files/lib/mwan3/common.sh
  5. +0
    -3
      net/mwan3/files/lib/mwan3/mwan3.sh
  6. +0
    -1
      net/mwan3/files/usr/sbin/mwan3
  7. +3
    -6
      net/mwan3/files/usr/sbin/mwan3rtmon
  8. +0
    -1
      net/mwan3/files/usr/sbin/mwan3track

+ 1
- 1
net/mwan3/Makefile View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=mwan3 PKG_NAME:=mwan3
PKG_VERSION:=2.10.5
PKG_VERSION:=2.10.6
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>, \ PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>, \
Aaron Goodman <aaronjg@alumni.stanford.edu> Aaron Goodman <aaronjg@alumni.stanford.edu>


+ 2
- 3
net/mwan3/files/etc/hotplug.d/iface/15-mwan3 View File

@ -21,7 +21,8 @@ fi
[ "$MWAN3_STARTUP" = "init" ] || procd_lock [ "$MWAN3_STARTUP" = "init" ] || procd_lock
config_load mwan3
mwan3_init
/etc/init.d/mwan3 running || { /etc/init.d/mwan3 running || {
[ "$MWAN3_STARTUP" = "init" ] || procd_lock [ "$MWAN3_STARTUP" = "init" ] || procd_lock
LOG notice "mwan3 hotplug $ACTION on $INTERFACE not called because globally disabled" LOG notice "mwan3 hotplug $ACTION on $INTERFACE not called because globally disabled"
@ -34,8 +35,6 @@ $IPT4 -S mwan3_hook &>/dev/null || {
exit 0 exit 0
} }
mwan3_init
if [ "$MWAN3_STARTUP" != "init" ] && [ "$ACTION" = "ifup" ]; then if [ "$MWAN3_STARTUP" != "init" ] && [ "$ACTION" = "ifup" ]; then
mwan3_set_user_iface_rules $INTERFACE $DEVICE mwan3_set_user_iface_rules $INTERFACE $DEVICE
fi fi


+ 0
- 2
net/mwan3/files/etc/init.d/mwan3 View File

@ -27,7 +27,6 @@ start_tracker() {
start_service() { start_service() {
local enabled hotplug_pids local enabled hotplug_pids
config_load mwan3
mwan3_init mwan3_init
config_foreach start_tracker interface config_foreach start_tracker interface
@ -57,7 +56,6 @@ start_service() {
stop_service() { stop_service() {
local ipset rule IP IPTR IPT family table tid local ipset rule IP IPTR IPT family table tid
config_load mwan3
mwan3_init mwan3_init
config_foreach mwan3_interface_shutdown interface config_foreach mwan3_interface_shutdown interface


+ 6
- 4
net/mwan3/files/lib/mwan3/common.sh View File

@ -107,8 +107,9 @@ mwan3_get_mwan3track_status()
mwan3_init() mwan3_init()
{ {
local bitcnt
local mmdefault
local bitcnt mmdefault source_routing
config_load mwan3
[ -d $MWAN3_STATUS_DIR ] || mkdir -p $MWAN3_STATUS_DIR/iface_state [ -d $MWAN3_STATUS_DIR ] || mkdir -p $MWAN3_STATUS_DIR/iface_state
@ -117,7 +118,6 @@ mwan3_init()
MMX_MASK=$(cat "${MWAN3_STATUS_DIR}/mmx_mask") MMX_MASK=$(cat "${MWAN3_STATUS_DIR}/mmx_mask")
MWAN3_INTERFACE_MAX=$(uci_get_state mwan3 globals iface_max) MWAN3_INTERFACE_MAX=$(uci_get_state mwan3 globals iface_max)
else else
config_load mwan3
config_get MMX_MASK globals mmx_mask '0x3F00' config_get MMX_MASK globals mmx_mask '0x3F00'
echo "$MMX_MASK"| tr 'A-F' 'a-f' > "${MWAN3_STATUS_DIR}/mmx_mask" echo "$MMX_MASK"| tr 'A-F' 'a-f' > "${MWAN3_STATUS_DIR}/mmx_mask"
LOG debug "Using firewall mask ${MMX_MASK}" LOG debug "Using firewall mask ${MMX_MASK}"
@ -130,7 +130,9 @@ mwan3_init()
fi fi
# remove "linkdown", expiry and source based routing modifiers from route lines # remove "linkdown", expiry and source based routing modifiers from route lines
MWAN3_ROUTE_LINE_EXP="s/linkdown //; s/expires [0-9]\+sec//;s/error [0-9]\+//; ${source_routing:+s/default\(.*\) from [^ ]*/default\1/;} p"
config_get_bool source_routing globals source_routing 0
[ $source_routing -eq 1 ] && unset source_routing
MWAN3_ROUTE_LINE_EXP="s/linkdown //; s/expires [0-9]\+sec//; s/error [0-9]\+//; ${source_routing:+s/default\(.*\) from [^ ]*/default\1/;} p"
# mark mask constants # mark mask constants
bitcnt=$(mwan3_count_one_bits MMX_MASK) bitcnt=$(mwan3_count_one_bits MMX_MASK)


+ 0
- 3
net/mwan3/files/lib/mwan3/mwan3.sh View File

@ -410,9 +410,6 @@ mwan3_delete_iface_iptables()
mwan3_get_routes() mwan3_get_routes()
{ {
local source_routing
config_get_bool source_routing globals source_routing 0
[ $source_routing -eq 0 ] && unset source_routing
$IP route list table main | sed -ne "$MWAN3_ROUTE_LINE_EXP" | uniq $IP route list table main | sed -ne "$MWAN3_ROUTE_LINE_EXP" | uniq
} }


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

@ -129,7 +129,6 @@ use() {
local interface device src_ip family local interface device src_ip family
mwan3_init mwan3_init
config_load mwan3
interface=$1 ; shift interface=$1 ; shift
[ -z "$*" ] && echo "no command specified for mwan3 use" && return [ -z "$*" ] && echo "no command specified for mwan3 use" && return


+ 3
- 6
net/mwan3/files/usr/sbin/mwan3rtmon View File

@ -69,14 +69,11 @@ mwan3_add_all_routes()
mwan3_rtmon_route_handle() mwan3_rtmon_route_handle()
{ {
local action route_line family tbl device line tid source_routing
local action route_line family tbl device line tid
route_line=${1##"Deleted "} route_line=${1##"Deleted "}
route_family=$2 route_family=$2
config_get_bool source_routing globals source_routing 0
[ $source_routing -eq 0 ] && unset source_routing
if [ "$route_line" = "$1" ]; then if [ "$route_line" = "$1" ]; then
action="replace" action="replace"
$IPS -! add mwan3_connected_${route_family##ip} ${route_line%% *} $IPS -! add mwan3_connected_${route_family##ip} ${route_line%% *}
@ -143,7 +140,8 @@ main()
{ {
local IP family local IP family
config_load mwan3
mwan3_init
family=$1 family=$1
[ -z $family ] && family=ipv4 [ -z $family ] && family=ipv4
if [ "$family" = "ipv6" ]; then if [ "$family" = "ipv6" ]; then
@ -155,7 +153,6 @@ main()
else else
IP="$IP4" IP="$IP4"
fi fi
mwan3_init
sh -c "echo \$\$; exec $IP monitor route" | { sh -c "echo \$\$; exec $IP monitor route" | {
read -r monitor_pid read -r monitor_pid
trap_with_arg func_trap "$monitor_pid" SIGINT SIGTERM SIGKILL trap_with_arg func_trap "$monitor_pid" SIGINT SIGTERM SIGKILL


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

@ -192,7 +192,6 @@ main() {
trap if_down USR1 trap if_down USR1
trap if_up USR2 trap if_up USR2
config_load mwan3
config_get FAMILY $INTERFACE family ipv4 config_get FAMILY $INTERFACE family ipv4
config_get track_method $INTERFACE track_method ping config_get track_method $INTERFACE track_method ping
config_get_bool httping_ssl $INTERFACE httping_ssl 0 config_get_bool httping_ssl $INTERFACE httping_ssl 0


Loading…
Cancel
Save