aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-04-18 18:54:13 (GMT)
committerJouni Malinen <j@w1.fi>2019-04-18 18:55:39 (GMT)
commitc8931afe2455895b0b0d4addc94d0a3691ec9ab5 (patch)
tree75ed00f37a8d41701bdf05ae913cbf5dad01d793 /src/drivers
parent9f721917e7ceb18e43dad6503cacff4be7c18663 (diff)
downloadhostap-c8931afe2455895b0b0d4addc94d0a3691ec9ab5.zip
hostap-c8931afe2455895b0b0d4addc94d0a3691ec9ab5.tar.gz
hostap-c8931afe2455895b0b0d4addc94d0a3691ec9ab5.tar.bz2
nl80211: Check nla_put_flag() failure for ext auth
All nla_put*() operations should be verified to succeed, so check this recently added one for NL80211_ATTR_EXTERNAL_AUTH_SUPPORT. Fixes: 236e793e7b8b ("nl80211: External authentication in driver-based AP SME mode") Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/driver_nl80211.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 21d1398..54fe390 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4171,8 +4171,10 @@ static int wpa_driver_nl80211_set_ap(void *priv,
nla_put_flag(msg, NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT)))
goto fail;
- if (drv->device_ap_sme && (params->key_mgmt_suites & WPA_KEY_MGMT_SAE))
- nla_put_flag(msg, NL80211_ATTR_EXTERNAL_AUTH_SUPPORT);
+ if (drv->device_ap_sme &&
+ (params->key_mgmt_suites & WPA_KEY_MGMT_SAE) &&
+ nla_put_flag(msg, NL80211_ATTR_EXTERNAL_AUTH_SUPPORT))
+ goto fail;
wpa_printf(MSG_DEBUG, "nl80211: pairwise_ciphers=0x%x",
params->pairwise_ciphers);