aboutsummaryrefslogtreecommitdiff
path: root/net/mwan3/files
diff options
context:
space:
mode:
authorAaron Goodman <aaronjg@stanford.edu>2020-12-13 09:27:03 -0500
committerFlorian Eckert <fe@dev.tdt.de>2020-12-16 09:32:13 +0100
commit21ac1b2c3ebf4735644366e22dccba482a92d558 (patch)
treeff9e5e3e316b338a3d2df2cac8db7c449600d188 /net/mwan3/files
parent5691ff247f24d6784af8fd2f5b7ed17879dbcc08 (diff)
mwan3: fix race condition in route loading
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
Diffstat (limited to 'net/mwan3/files')
-rwxr-xr-xnet/mwan3/files/usr/sbin/mwan3rtmon4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mwan3/files/usr/sbin/mwan3rtmon b/net/mwan3/files/usr/sbin/mwan3rtmon
index e460615ed..44cd28a91 100755
--- a/net/mwan3/files/usr/sbin/mwan3rtmon
+++ b/net/mwan3/files/usr/sbin/mwan3rtmon
@@ -158,6 +158,7 @@ main()
sh -c "echo \$\$; exec $IP monitor route" | {
read -r monitor_pid
trap_with_arg func_trap "$monitor_pid" SIGINT SIGTERM SIGKILL
+ KILL -SIGSTOP $$
while IFS='' read -r line; do
[ -z "${line##*table*}" ] && continue
LOG debug "handling route update $family '$line'"
@@ -165,11 +166,10 @@ main()
done
} &
child=$!
- kill -SIGSTOP $child
trap_with_arg func_trap "$child" SIGINT SIGTERM SIGKILL
mwan3_set_connected_${family}
mwan3_add_all_routes ${family}
kill -SIGCONT $child
- wait $!
+ wait $child
}
main "$@"