1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-16 12:23:59 +02:00

mwan3: lock critical mwan3rtmon section

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2019-01-15 10:20:02 +01:00
parent c059c283fe
commit dd206b7d0b

View File

@ -23,11 +23,16 @@ main() {
config_get rtmon_interval globals rtmon_interval '5'
sleep 3
while mwan3_rtmon_ipv4 || mwan3_rtmon_ipv6; do
while true; do
mwan3_lock
[ mwan3_remon_ipv4 = "1" ] || \
[ mwan3_rtmon_ipv6 = "1" ] && break
mwan3_unlock
[ "$rtmon_interval" = "0" ] && break
sleep "$rtmon_interval" &
wait
done
mwan3_unlock
}
main "$@"