mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-17 17:43:06 -05:00
nl80211: Fix NL80211_ATTR_SMPS_MODE encoding
This nl80211 attribute uses NLA_U8 policy in cfg80211 and hostapd/wpa_supplicant needs to use same size when writing the attribute. This fixes AP mode regression triggered by kernel commit "net: netlink: Update attr validation to require exact length for some types" in v4.15-rc1 that resulted in the following debug log entry when trying to enable beaconing: nl80211: Beacon set failed: -34 (Numerical result out of range) Fixes: da1080d7215f ("nl80211: Advertise and configure SMPS modes") Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
ce83008c79
commit
a2426829ce
@ -3957,7 +3957,7 @@ static int wpa_driver_nl80211_set_ap(void *priv,
|
|||||||
smps_mode = NL80211_SMPS_OFF;
|
smps_mode = NL80211_SMPS_OFF;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (nla_put_u32(msg, NL80211_ATTR_SMPS_MODE, smps_mode))
|
if (nla_put_u8(msg, NL80211_ATTR_SMPS_MODE, smps_mode))
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user