]> git.ipfire.org Git - thirdparty/hostap.git/commit - src/drivers/driver_nl80211.c
nl80211: Don't accept interrupted dump responses
authorJouni Malinen <j@w1.fi>
Thu, 2 Jan 2020 21:16:22 +0000 (23:16 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 2 Jan 2020 21:34:53 +0000 (23:34 +0200)
commit16a2667203ea059fb7012ee1def0f4f798711c09
tree40b4afcc2e56ed21645e0d5ad82caacb99bfb50a
parent696acdf3330d54c0c28231a33cea05b1bf000795
nl80211: Don't accept interrupted dump responses

Netlink dump message may be interrupted if an internal inconsistency is
detected in the kernel code. This can happen, e.g., if a Beacon frame
from the current AP is received while NL80211_CMD_GET_SCAN is used to
fetch scan results. Previously, such cases would end up not reporting an
error and that could result in processing partial data.

Modify this by detecting this special interruption case and converting
it to an error. For the NL80211_CMD_GET_SCAN, try again up to 10 times
to get the full response. For other commands (which are not yet known to
fail in similar manner frequently), report an error to the caller.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c
src/drivers/driver_nl80211_scan.c