FreeBSD Bugzilla – Attachment 232913 Details for
Bug 253608
hostapd 100% CPU usage after WiFi device disappears
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Use pcap call that returns a return code
hostapd.diff (text/plain), 645 bytes, created by
Cy Schubert
on 2022-04-03 03:46:19 UTC
(
hide
)
Description:
Use pcap call that returns a return code
Filename:
MIME Type:
Creator:
Cy Schubert
Created:
2022-04-03 03:46:19 UTC
Size:
645 bytes
patch
obsolete
>diff --git a/contrib/wpa/src/l2_packet/l2_packet_freebsd.c b/contrib/wpa/src/l2_packet/l2_packet_freebsd.c >index 48e18fffba57..da742f432120 100644 >--- a/contrib/wpa/src/l2_packet/l2_packet_freebsd.c >+++ b/contrib/wpa/src/l2_packet/l2_packet_freebsd.c >@@ -83,7 +83,10 @@ static void l2_packet_receive(int sock, void *eloop_ctx, void *sock_ctx) > unsigned char *buf; > size_t len; > >- packet = pcap_next(pcap, &hdr); >+ if (pcap_next_ex(pcap, &hdr, &packet) == -1) { >+ wpa_printf(MSG_ERROR, "Error reading packet, has device disappeared?"); >+ eloop_terminate(); >+ } > > if (!l2->rx_callback || !packet || hdr.caplen < sizeof(*ethhdr)) > return;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 253608
: 232913