From: Anna Tikhomirova <vamp@vampik.ru> Date: Fri, 28 Apr 2023 20:33:39 +0000 (+0300) Subject: mwan3: fix addition of iptables rules for mwan3 sticky rules X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4addfcf15da83ba7f5d34dc22a17def200fe5121;p=feed%2Fpackages.git mwan3: fix addition of iptables rules for mwan3 sticky rules Addition of iptables rules for mwan3 sticky rules is broken, resulting in non-working sticky rules. The required parameters for the function 'mwan3_set_sticky_iptables' were passed in the wrong order. Signed-off-by: Anna Tikhomirova <vamp@vampik.ru> * Update commit message * Quoting function arguments Signed-off-by: Florian Eckert <fe@dev.tdt.de> (cherry picked from commit 66257510d9613478a9fd99c41d745329476f7574) --- diff --git a/net/mwan3/files/lib/mwan3/mwan3.sh b/net/mwan3/files/lib/mwan3/mwan3.sh index 1bfb767e86..a3e7c00985 100644 --- a/net/mwan3/files/lib/mwan3/mwan3.sh +++ b/net/mwan3/files/lib/mwan3/mwan3.sh @@ -735,8 +735,8 @@ mwan3_set_policies_iptables() mwan3_set_sticky_iptables() { - local rule="${1}" - local interface="${2}" + local interface="${1}" + local rule="${2}" local ipv="${3}" local policy="${4}" @@ -879,7 +879,7 @@ mwan3_set_user_iptables_rule() fi mwan3_push_update -F "mwan3_rule_$1" - config_foreach mwan3_set_sticky_iptables interface $ipv "$policy" + config_foreach mwan3_set_sticky_iptables interface "$rule" "$ipv" "$policy" mwan3_push_update -A "mwan3_rule_$1" \