From 87c611abf8facb3b401006cece0c722676c63860 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 28 Mar 2022 14:02:18 +0200 Subject: [PATCH] mwan3: fix sticky chain length Signed-off-by: Florian Eckert --- net/mwan3/Makefile | 2 +- net/mwan3/files/lib/mwan3/mwan3.sh | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) 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 -- 2.30.2