]> git.ipfire.org Git - thirdparty/hostap.git/commit
hostapd_cli: Open a new hostapd connection on ping failure when using -a main pending
authorSai Pratyusha Magam <smagam@qti.qualcomm.com>
Sat, 2 Aug 2025 16:42:57 +0000 (22:12 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 15 Aug 2025 20:42:03 +0000 (23:42 +0300)
commitacadef1b04d5e9f7b329b8c20d8429b000e7e683
treebf9702ee5e83a96482656fe03e2bfd116f955c1f
parent40326b60b17a41cb9c1319c006cf5206dace3cee
hostapd_cli: Open a new hostapd connection on ping failure when using -a

When hostapd_cli is started with the -a option, the process enters an
eloop. Every ping interval (five seconds) hostapd_cli sends a PING to
hostapd and waits to receive a response. In a particular issue scenario,
the hostapd_cli control interface socket file in /tmp/wpa_ctrl_xx gets
deleted due to which hostapd is no longer able respond to the PING.
hostapd_cli times out waiting for the socket to become ready for read
and terminates from eloop causing the hostapd_cli process to exit.

hostapd_cli in interactive mode handles a PING response failure by
closing the current connection and opening a new connection using
hostapd_cli_reconnect(). Adopt the same approach for the action file
case instead of terminating the process.

Signed-off-by: Sai Pratyusha Magam <smagam@qti.qualcomm.com>
hostapd/hostapd_cli.c