occasionally wpa_cli gives up running while in daemon mode

Samitha Wijedasa samitha.wijedasa at yahoo.com
Tue Jun 9 22:08:16 EDT 2015


Hi,
I have wpa_clistarted as a daemon running in background along with thecorresponding wpa_supplicant daemon. The wpa_cli carries out dhcpsession management using an action script. I have noticedoccasionally wpa_cli gives up running. I want to make sure wpa_cliwill be there as long as wpa_supplcant is there.
In wpa_cli code, inside wpa_cli_action(struct wpa_ctrl *ctrl) function, I have noticed followingline of code. I suspect it is giving up because it may have missed aPING response.
My question is, If Icommented out line 02161, the "break;” statement, will it contribute to anyunexpected behavior.


if (FD_ISSET(fd, &rfds))
02152                         wpa_cli_recv_pending(ctrl, 0, 1);
02153                 else {
02154                         /* verify that connection is still working */
02155                         len = sizeof(buf) - 1;
02156                         if (wpa_ctrl_request(ctrl, "PING", 4, buf, &len,
02157                                              wpa_cli_action_cb) < 0 ||
02158                             len < 4 || os_memcmp(buf, "PONG", 4) != 0) {
02159                                 printf("wpa_supplicant did not reply to PING "
02160                                        "command - exiting\n");
02161                                 break;
02162                         }
02163                 }Thanks
Samitha

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20150610/b3e86800/attachment.htm>


More information about the HostAP mailing list