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: 236e793e7b ("nl80211: External authentication in driver-based AP SME mode")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2019-04-18 21:54:13 +03:00 committed by Jouni Malinen
parent 9f721917e7
commit c8931afe24

View file

@ -4171,8 +4171,10 @@ static int wpa_driver_nl80211_set_ap(void *priv,
nla_put_flag(msg, NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT))) nla_put_flag(msg, NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT)))
goto fail; goto fail;
if (drv->device_ap_sme && (params->key_mgmt_suites & WPA_KEY_MGMT_SAE)) if (drv->device_ap_sme &&
nla_put_flag(msg, NL80211_ATTR_EXTERNAL_AUTH_SUPPORT); (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", wpa_printf(MSG_DEBUG, "nl80211: pairwise_ciphers=0x%x",
params->pairwise_ciphers); params->pairwise_ciphers);