aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-12-01 20:21:24 (GMT)
committerJouni Malinen <j@w1.fi>2017-12-01 20:21:24 (GMT)
commit963d3149abfcbab5b83f9023bc50321f777360d1 (patch)
treea18a70834d29a9947208281d4cced569a83b3056
parenta2426829ce426de82d2fa47071ca41ea81c43307 (diff)
downloadhostap-963d3149abfcbab5b83f9023bc50321f777360d1.zip
hostap-963d3149abfcbab5b83f9023bc50321f777360d1.tar.gz
hostap-963d3149abfcbab5b83f9023bc50321f777360d1.tar.bz2
nl80211: Fix NL80211_MESHCONF_AUTO_OPEN_PLINKS encoding
This nl80211 attribute uses NLA_U8 policy in cfg80211 and wpa_supplicant needs to use same size when writing the attribute. This fixes mesh 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 join a mesh: nl80211: mesh join failed: ret=-22 (Invalid argument) Fixes: 6c1664f6051f ("nl80211: Add new commands to support mesh interfaces") Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--src/drivers/driver_nl80211.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 7571e77..58e6bf9 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -9026,8 +9026,8 @@ static int nl80211_put_mesh_config(struct nl_msg *msg,
return -1;
if (((params->flags & WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS) &&
- nla_put_u32(msg, NL80211_MESHCONF_AUTO_OPEN_PLINKS,
- params->auto_plinks)) ||
+ nla_put_u8(msg, NL80211_MESHCONF_AUTO_OPEN_PLINKS,
+ params->auto_plinks)) ||
((params->flags & WPA_DRIVER_MESH_CONF_FLAG_MAX_PEER_LINKS) &&
nla_put_u16(msg, NL80211_MESHCONF_MAX_PEER_LINKS,
params->max_peer_links)) ||