Cy Schubert 6e5d01124f wpa/hostapd: Fix 100% CPU when USB wlan NIC removed
hostapd calls pcap_next(3) to read the next packet off the wlan interface.
pcap_next() returns a pointer to the packet header but does not indicate
success or failure. Unfortunately this results in an infinite loop (100%
CPU) when the wlan device disappears, i.e. when a USB wlan device is
manually removed or a USB error results in the device removal. However
pcap_next_ex(3) does return success or failure. To resolve this we use
pcap_next_ex(), forcing hostapd to exit when the error is encountered.

An error message is printed to syslog or stderr when debugging (-d flag)
is enabled. Unfortunately wpa_printf() only works when debugging is enabled.

PR:		253608
Reported by:	Damjan Jovanovic <damjan.jov@gmail.com>,
		bz (privately)
MFC after:	3 days
2022-04-04 06:11:28 -07:00
..
2022-04-03 12:58:43 -07:00
2022-01-18 08:10:33 -08:00
2021-12-06 16:36:44 -05:00
2021-03-01 16:01:44 +01:00
2022-02-05 21:55:03 -05:00
2022-01-03 22:03:39 -08:00
2022-02-22 19:34:28 +01:00
2021-07-17 22:20:44 -07:00
2021-01-13 23:56:18 -06:00
2021-11-15 16:58:58 +01:00
2021-12-06 16:36:44 -05:00
2021-11-06 16:24:36 -06:00
2021-02-23 17:47:07 +00:00
2021-01-12 00:56:35 +02:00
2021-11-05 09:39:56 +01:00
2021-05-20 00:12:27 +03:00
2022-02-17 16:05:15 -08:00