aboutsummaryrefslogtreecommitdiff
path: root/net/mwan3
diff options
context:
space:
mode:
authorAaron Goodman <aaronjg@stanford.edu>2020-11-10 08:44:49 -0500
committerAaron Goodman <aaronjg@stanford.edu>2020-11-10 08:44:49 -0500
commit99b4b3a1780de533c44a40c79eaa6bba6d3f7212 (patch)
tree7f7c908103d152ef89c8ccfbc08cc30a1df91f95 /net/mwan3
parent9df64276e18b8a3a9da3a0075bf7f5fdc8d75c26 (diff)
mwan3: add logging for ipset errors
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
Diffstat (limited to 'net/mwan3')
-rw-r--r--net/mwan3/files/lib/mwan3/mwan3.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/net/mwan3/files/lib/mwan3/mwan3.sh b/net/mwan3/files/lib/mwan3/mwan3.sh
index 43740e2de..5bb8a579d 100644
--- a/net/mwan3/files/lib/mwan3/mwan3.sh
+++ b/net/mwan3/files/lib/mwan3/mwan3.sh
@@ -153,7 +153,8 @@ mwan3_set_connected_ipv4()
{
local connected_network_v4 candidate_list cidr_list
$IPS -! create mwan3_connected_v4 hash:net
- $IPS create mwan3_connected_v4_temp hash:net
+ $IPS create mwan3_connected_v4_temp hash:net ||
+ LOG notice "failed to create ipset mwan3_connected_v4_temp"
candidate_list=""
cidr_list=""
@@ -178,10 +179,13 @@ mwan3_set_connected_ipv4()
$IPS -! add mwan3_connected_v4_temp "$connected_network_v4"
done
- $IPS add mwan3_connected_v4_temp 224.0.0.0/3
+ $IPS add mwan3_connected_v4_temp 224.0.0.0/3 ||
+ LOG notice "failed to add 224.0.0.0/3 to mwan3_connected_v4_temp"
- $IPS swap mwan3_connected_v4_temp mwan3_connected_v4
- $IPS destroy mwan3_connected_v4_temp
+ $IPS swap mwan3_connected_v4_temp mwan3_connected_v4 ||
+ LOG notice "failed to swap mwan3_connected_v4_temp and mwan3_connected_v4"
+ $IPS destroy mwan3_connected_v4_temp ||
+ LOG notice "failed to destroy ipset mwan3_connected_v4_temp"
$IPS -! add mwan3_connected mwan3_connected_v4
}
@@ -517,7 +521,8 @@ mwan3_delete_iface_ipset_entries()
for setname in $(ipset -n list | grep ^mwan3_sticky_); 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
+ $IPS del "$setname" $entry ||
+ LOG notice "failed to delete $entry from $setname"
done
done
}