mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
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:
@@ -1092,9 +1092,7 @@ mwan3_report_connected_v4()
|
||||
local address
|
||||
|
||||
if [ -n "$($IPT4 -S mwan3_connected 2> /dev/null)" ]; then
|
||||
for address in $($IPS list mwan3_connected_v4 | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}'); do
|
||||
echo " $address"
|
||||
done
|
||||
$IPS -o save list mwan3_connected_v4 | grep add | cut -d " " -f 3
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1103,9 +1101,7 @@ mwan3_report_connected_v6()
|
||||
local address
|
||||
|
||||
if [ -n "$($IPT6 -S mwan3_connected 2> /dev/null)" ]; then
|
||||
for address in $($IPS list mwan3_connected_v6 | egrep '([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])'); do
|
||||
echo " $address"
|
||||
done
|
||||
$IPS -o save list mwan3_connected_v6 | grep add | cut -d " " -f 3
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user