WNM: Fix AP processing without wnm_oper driver callback
hostapd_drv_wnm_oper() needs to indicate an error if the driver callback function is not implemented. Without this, the buf_len argument could have been left uninitialized which could result in crashing the process. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
2025cad9b8
commit
477689788c
1 changed files with 1 additions and 1 deletions
|
@ -714,7 +714,7 @@ int hostapd_drv_wnm_oper(struct hostapd_data *hapd, enum wnm_oper oper,
|
||||||
const u8 *peer, u8 *buf, u16 *buf_len)
|
const u8 *peer, u8 *buf, u16 *buf_len)
|
||||||
{
|
{
|
||||||
if (hapd->driver == NULL || hapd->driver->wnm_oper == NULL)
|
if (hapd->driver == NULL || hapd->driver->wnm_oper == NULL)
|
||||||
return 0;
|
return -1;
|
||||||
return hapd->driver->wnm_oper(hapd->drv_priv, oper, peer, buf,
|
return hapd->driver->wnm_oper(hapd->drv_priv, oper, peer, buf,
|
||||||
buf_len);
|
buf_len);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue