Skip to content

Commit

Permalink
[nrf noup] zephyr: Fix handling of zero-byte receive
Browse files Browse the repository at this point in the history
fixup! [nrf noup] zephyr: Add support for WPA CLI zephyr

Sometimes even if the peer didn't close the socket, we still see zero
byte receive, and un-registering for those cases causes the system to
be broken.

Handle the case by ignoring the current message but keeping the socket
registered.

Fixes SHEL-2283.

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 authored and tejlmand committed Jan 25, 2024
1 parent e7c9467 commit a42ccc3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion wpa_supplicant/ctrl_iface_zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx,
return;
}
if (!res) {
eloop_unregister_sock(sock, EVENT_TYPE_READ);
wpa_printf(MSG_DEBUG, "ctrl_iface: Peer unexpectedly shut down "
"socket");
os_free(buf);
Expand Down

0 comments on commit a42ccc3

Please sign in to comment.