summaryrefslogtreecommitdiff
path: root/src/drivers/driver_nl80211_scan.c
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2022-01-30 20:22:00 +0100
committerAndrej Shadura <andrewsh@debian.org>2022-05-05 11:25:22 +0100
commit1f4ed4868d9ee8b80cfb81585d226035b64aeec2 (patch)
treef3ad96e5eeabf27ffc449d6684522b57b248e5c5 /src/drivers/driver_nl80211_scan.c
parentd97072bf3775e78bf9176114e74f054bdf9a3186 (diff)
nl80211: add extra-ies only if allowed by driver
Upgrading wpa_supplicant from 2.9 to 2.10 breaks broadcom-wl based adapters. The reason for it is hostapd tries to install additional IEs for scanning while the driver does not support this. The kernel indicates the maximum number of bytes for additional scan IEs using the NL80211_ATTR_MAX_SCAN_IE_LEN attribute. Save this value and only add additional scan IEs in case the driver can accommodate these additional IEs. Reported-by: Étienne Morice <neon.emorice@mail.com> Tested-by: Étienne Morice <neon.emorice@mail.com> Signed-off-by: David Bauer <mail@david-bauer.net> Bug: http://lists.infradead.org/pipermail/hostap/2022-January/040178.html Bug-ArchLinux: https://bugs.archlinux.org/task/73495 Bug-Debian: https://bugs.debian.org/1004524 Origin: http://lists.infradead.org/pipermail/hostap/2022-January/040185.html Gbp-Pq: Topic upstream-fixes Gbp-Pq: Name 0001-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
Diffstat (limited to 'src/drivers/driver_nl80211_scan.c')
-rw-r--r--src/drivers/driver_nl80211_scan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c
index 1316084..b0f0951 100644
--- a/src/drivers/driver_nl80211_scan.c
+++ b/src/drivers/driver_nl80211_scan.c
@@ -207,7 +207,7 @@ nl80211_scan_common(struct i802_bss *bss, u8 cmd,
wpa_printf(MSG_DEBUG, "nl80211: Passive scan requested");
}
- if (params->extra_ies) {
+ if (params->extra_ies && drv->capa.max_scan_ie_len >= params->extra_ies_len) {
wpa_hexdump(MSG_MSGDUMP, "nl80211: Scan extra IEs",
params->extra_ies, params->extra_ies_len);
if (nla_put(msg, NL80211_ATTR_IE, params->extra_ies_len,