]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Stop hlr_auc_gw more cleanly
authorJouni Malinen <j@w1.fi>
Sun, 22 Dec 2024 11:26:25 +0000 (13:26 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 22 Dec 2024 11:27:29 +0000 (13:27 +0200)
Use the new TERMINATE command through the socket to stop hlr_auc_gw
instead of depending on killall. There seemed to be some kind of race
condition with UML that could prevent cleanup previously.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/stop.sh

index 22e24cd395418d4a151b7327819583ff1ad8a729..514993c1b5210d5194bdb8d3407cd0030045315a 100755 (executable)
@@ -18,6 +18,12 @@ if grep -q hwsim0 /proc/net/dev; then
     sudo ip link set hwsim0 down
 fi
 
+if [ -e /tmp/hlr_auc_gw.sock ]; then
+    if which -s socat; then
+       echo TERMINATE | socat - UNIX-SENDTO:/tmp/hlr_auc_gw.sock
+       sleep 0.1
+    fi
+fi
 sudo killall -q hlr_auc_gw
 
 if [ "$RUNNING" = "yes" ]; then