mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-30 16:54:04 -05:00
Do not block on ctrl_iface monitor events
It looks like some of the global control interface cases ended up blocking in sendmsg() when trying to send an event. Since this can block all wpa_supplicant processing for multiple seconds, this is very undesirable. Avoid this by requesting sendmsg() to return an error rather than waiting for the message to be sent. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
eb7ddbf108
commit
b62b29ea87
@ -602,7 +602,7 @@ static void wpa_supplicant_ctrl_iface_send(const char *ifname, int sock,
|
|||||||
offsetof(struct sockaddr_un, sun_path));
|
offsetof(struct sockaddr_un, sun_path));
|
||||||
msg.msg_name = (void *) &dst->addr;
|
msg.msg_name = (void *) &dst->addr;
|
||||||
msg.msg_namelen = dst->addrlen;
|
msg.msg_namelen = dst->addrlen;
|
||||||
if (sendmsg(sock, &msg, 0) < 0) {
|
if (sendmsg(sock, &msg, MSG_DONTWAIT) < 0) {
|
||||||
int _errno = errno;
|
int _errno = errno;
|
||||||
wpa_printf(MSG_INFO, "CTRL_IFACE monitor[%d]: "
|
wpa_printf(MSG_INFO, "CTRL_IFACE monitor[%d]: "
|
||||||
"%d - %s",
|
"%d - %s",
|
||||||
|
Loading…
Reference in New Issue
Block a user