Browse Source

mwan3: lock critical mwan3rtmon section

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
lilik-openwrt-22.03
Florian Eckert 6 years ago
parent
commit
dd206b7d0b
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      net/mwan3/files/usr/sbin/mwan3rtmon

+ 6
- 1
net/mwan3/files/usr/sbin/mwan3rtmon View File

@ -23,11 +23,16 @@ main() {
config_get rtmon_interval globals rtmon_interval '5' config_get rtmon_interval globals rtmon_interval '5'
sleep 3 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 [ "$rtmon_interval" = "0" ] && break
sleep "$rtmon_interval" & sleep "$rtmon_interval" &
wait wait
done done
mwan3_unlock
} }
main "$@" main "$@"

Loading…
Cancel
Save