From: Florian Eckert Date: Mon, 28 Mar 2022 12:02:18 +0000 (+0200) Subject: mwan3: fix sticky chain length X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1534c958eb1e43df38b590698839b031a135b9a5;p=feed%2Fpackages.git mwan3: fix sticky chain length Signed-off-by: Florian Eckert (cherry picked from commit 87c611abf8facb3b401006cece0c722676c63860) --- diff --git a/net/mwan3/Makefile b/net/mwan3/Makefile index 70778c61ce..c3e486dbf8 100644 --- a/net/mwan3/Makefile +++ b/net/mwan3/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mwan3 -PKG_VERSION:=2.11.0 +PKG_VERSION:=2.11.1 PKG_RELEASE:=1 PKG_MAINTAINER:=Florian Eckert , \ Aaron Goodman diff --git a/net/mwan3/files/lib/mwan3/mwan3.sh b/net/mwan3/files/lib/mwan3/mwan3.sh index ec627be689..f48a145cb6 100644 --- a/net/mwan3/files/lib/mwan3/mwan3.sh +++ b/net/mwan3/files/lib/mwan3/mwan3.sh @@ -562,7 +562,7 @@ mwan3_delete_iface_ipset_entries() [ -n "$id" ] || return 0 - for setname in $(ipset -n list | grep ^mwan3_sticky_); do + for setname in $(ipset -n list | grep ^mwan3_rule_); do for entry in $(ipset list "$setname" | grep "$(mwan3_id2mask id MMX_MASK | awk '{ printf "0x%08x", $1; }')" | cut -d ' ' -f 1); do $IPS del "$setname" $entry || LOG notice "failed to delete $entry from $setname" @@ -750,7 +750,7 @@ mwan3_set_sticky_iptables() if [ -z "${current##*-N mwan3_iface_in_${iface}$'\n'*}" ]; then mwan3_push_update -I "mwan3_rule_$rule" \ -m mark --mark "$(mwan3_id2mask id MMX_MASK)/$MMX_MASK" \ - -m set ! --match-set "mwan3_sticky_${ipv}_${rule}" src,src \ + -m set ! --match-set "mwan3_rule_${ipv}_${rule}" src,src \ -j MARK --set-xmark "0x0/$MMX_MASK" mwan3_push_update -I "mwan3_rule_$rule" \ -m mark --mark "0/$MMX_MASK" \ @@ -769,12 +769,12 @@ mwan3_set_sticky_ipset() local error local update="" - mwan3_push_update -! create "mwan3_sticky_ipv4_$rule" \ + mwan3_push_update -! create "mwan3_rule_ipv4_$rule" \ hash:ip,mark markmask "$mmx" \ timeout "$timeout" [ $NO_IPV6 -eq 0 ] && - mwan3_push_update -! create "mwan3_sticky_ipv6_$rule" \ + mwan3_push_update -! create "mwan3_rule_ipv6_$rule" \ hash:ip,mark markmask "$mmx" \ timeout "$timeout" family inet6 @@ -887,10 +887,10 @@ mwan3_set_user_iptables_rule() -j "$policy" mwan3_push_update -A "mwan3_rule_$1" \ -m mark ! --mark 0xfc00/0xfc00 \ - -j SET --del-set "mwan3_sticky_${ipv}_${rule}" src,src + -j SET --del-set "mwan3_rule_${ipv}_${rule}" src,src mwan3_push_update -A "mwan3_rule_$1" \ -m mark ! --mark 0xfc00/0xfc00 \ - -j SET --add-set "mwan3_sticky_${ipv}_${rule}" src,src + -j SET --add-set "mwan3_rule_${ipv}_${rule}" src,src policy="mwan3_rule_$1" fi if [ "$global_logging" = "1" ] && [ "$rule_logging" = "1" ]; then