From 502779755a43a2ef8b99f8d7ff9e712626bc037d Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 25 Feb 2022 16:17:39 +0100 Subject: [PATCH] mwan3: use mwan3_push_update function for mwan3_delete_iface_iptables Signed-off-by: Florian Eckert --- net/mwan3/files/lib/mwan3/mwan3.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/net/mwan3/files/lib/mwan3/mwan3.sh b/net/mwan3/files/lib/mwan3/mwan3.sh index 272e8a97e2..cd9a939c25 100644 --- a/net/mwan3/files/lib/mwan3/mwan3.sh +++ b/net/mwan3/files/lib/mwan3/mwan3.sh @@ -380,7 +380,7 @@ mwan3_create_iface_iptables() mwan3_delete_iface_iptables() { - local IPT + local IPT update config_get family "$1" family ipv4 if [ "$family" = "ipv4" ]; then @@ -392,12 +392,18 @@ mwan3_delete_iface_iptables() IPT="$IPT6" fi - $IPT -D mwan3_ifaces_in \ - -m mark --mark 0x0/$MMX_MASK \ - -j "mwan3_iface_in_$1" &> /dev/null - $IPT -F "mwan3_iface_in_$1" &> /dev/null - $IPT -X "mwan3_iface_in_$1" &> /dev/null + update="*mangle" + + mwan3_push_update -D mwan3_ifaces_in \ + -m mark --mark 0x0/$MMX_MASK \ + -j "mwan3_iface_in_$1" &> /dev/null + mwan3_push_update -F "mwan3_iface_in_$1" &> /dev/null + mwan3_push_update -X "mwan3_iface_in_$1" &> /dev/null + + mwan3_push_update COMMIT + mwan3_push_update "" + error=$(echo "$update" | $IPTR 2>&1) || LOG error "delete_iface_iptables_${1}: $error" } mwan3_extra_tables_routes() -- 2.30.2