Fwd: truncated events from WPA supplicant

Ros Spolyak rostokus at gmail.com
Tue Sep 14 12:33:52 PDT 2021


I have subscribed to WPA events in my application and often the
received events are truncated. The rest of the time events are
correct. Example,
<3>CTRL-EVENT-BSS-RE event received (len 20)
<3>CTRL-EVENT-DISCON event received (len 20)

The code I am using:
  if (wpa_ctrl_pending(ctrl_conn_g) > 0) {
    char buf[256] = {0};
    size_t len = sizeof(buf) - 1;

    while (wpa_ctrl_recv(ctrl_conn_g, buf, &len) == 0) {
      buf[len] = '\0';
      printf("'%s' event received (len %u)", buf, len);
    }
}

Any thoughts on what could be wrong?



More information about the Hostap mailing list