From 5a80a5dbfe839a7c2bdec298a6bb87ed1b93b846 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Tue, 8 Mar 2022 11:51:02 +0100 Subject: [PATCH] mwan3: unify error messages Signed-off-by: Florian Eckert --- net/mwan3/files/lib/mwan3/mwan3.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/mwan3/files/lib/mwan3/mwan3.sh b/net/mwan3/files/lib/mwan3/mwan3.sh index 31c47046f6..7402356934 100644 --- a/net/mwan3/files/lib/mwan3/mwan3.sh +++ b/net/mwan3/files/lib/mwan3/mwan3.sh @@ -342,9 +342,9 @@ mwan3_set_general_iptables() mwan3_push_update COMMIT mwan3_push_update "" if [ "$IPT" = "$IPT4" ]; then - error=$(echo "$update" | $IPT4R 2>&1) || LOG error "set_general_iptables: $error" + error=$(echo "$update" | $IPT4R 2>&1) || LOG error "set_general_iptables (${family}): $error" else - error=$(echo "$update" | $IPT6R 2>&1) || LOG error "set_general_iptables: $error" + error=$(echo "$update" | $IPT6R 2>&1) || LOG error "set_general_iptables (${family}): $error" fi done } @@ -405,7 +405,7 @@ mwan3_create_iface_iptables() mwan3_push_update COMMIT mwan3_push_update "" - error=$(echo "$update" | $IPTR 2>&1) || LOG error "create_iface_iptables: $error" + error=$(echo "$update" | $IPTR 2>&1) || LOG error "create_iface_iptables (${1}): $error" } @@ -434,7 +434,7 @@ mwan3_delete_iface_iptables() mwan3_push_update COMMIT mwan3_push_update "" - error=$(echo "$update" | $IPTR 2>&1) || LOG error "delete_iface_iptables_${1}: $error" + error=$(echo "$update" | $IPTR 2>&1) || LOG error "delete_iface_iptables (${1}): $error" } mwan3_extra_tables_routes() @@ -766,7 +766,7 @@ mwan3_set_sticky_ipset() hash:ip,mark markmask "$mmx" \ timeout "$timeout" family inet6 - error=$(echo "$update" | $IPS restore 2>&1) || LOG error "set_sticky_ipset_${rule}: $error" + error=$(echo "$update" | $IPS restore 2>&1) || LOG error "set_sticky_ipset (${rule}): $error" } mwan3_set_user_iptables_rule() @@ -969,7 +969,7 @@ mwan3_set_user_rules() mwan3_push_update COMMIT mwan3_push_update "" - error=$(echo "$update" | $IPTR 2>&1) || LOG error "set_user_rules: $error" + error=$(echo "$update" | $IPTR 2>&1) || LOG error "set_user_rules (${ipv}): $error" done -- 2.30.2