net/mwan3: enhance ipset status generation

This change should optimize and speed up the status output generation.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert
2018-10-15 08:58:57 +02:00
parent ac8c4512d1
commit 84007a2723
2 changed files with 4 additions and 8 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ report_connected_v4() {
local address
if [ -n "$($IPT4 -S mwan3_connected 2> /dev/null)" ]; then
for address in $($IPS list mwan3_connected_v4 | tail -n +8); do
for address in $($IPS -o save list mwan3_connected_v4 | grep add | cut -d " " -f 3); do
json_add_string "" "${address}"
done
fi
@@ -25,7 +25,7 @@ report_connected_v6() {
local address
if [ -n "$($IPT6 -S mwan3_connected 2> /dev/null)" ]; then
for address in $($IPS list mwan3_connected_v6 | tail -n +8); do
for address in $($IPS -o save list mwan3_connected_v6 | grep add | cut -d " " -f 3); do
json_add_string "" "${address}"
done
fi