3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

netdev: fix WPS test (with ControlPortOverNL80211 on)

At some point the connect command builder was modified, and the
control port over NL80211 check was moved to inside if (is_rsn).
For WPS, no supplicant_ie was set, so CONTROL_PORT_OVER_NL80211
was never set into CMD_CONNECT. This caused IWD to expect WPS
frames over netlink, but the kernel was sending them over the
legacy route.
This commit is contained in:
James Prestwood 2019-03-19 11:45:03 -07:00 committed by Denis Kenzior
parent 6e44295fe2
commit 2042fe7a73

View File

@ -2745,16 +2745,16 @@ static struct l_genl_msg *netdev_build_cmd_connect(struct netdev *netdev,
l_genl_msg_append_attr(msg, NL80211_ATTR_CONTROL_PORT, 0, NULL); l_genl_msg_append_attr(msg, NL80211_ATTR_CONTROL_PORT, 0, NULL);
if (netdev->pae_over_nl80211)
l_genl_msg_append_attr(msg,
NL80211_ATTR_CONTROL_PORT_OVER_NL80211,
0, NULL);
iov[iov_elems].iov_base = (void *) hs->supplicant_ie; iov[iov_elems].iov_base = (void *) hs->supplicant_ie;
iov[iov_elems].iov_len = hs->supplicant_ie[1] + 2; iov[iov_elems].iov_len = hs->supplicant_ie[1] + 2;
iov_elems += 1; iov_elems += 1;
} }
if (netdev->pae_over_nl80211)
l_genl_msg_append_attr(msg,
NL80211_ATTR_CONTROL_PORT_OVER_NL80211,
0, NULL);
if (hs->mde) { if (hs->mde) {
iov[iov_elems].iov_base = (void *) hs->mde; iov[iov_elems].iov_base = (void *) hs->mde;
iov[iov_elems].iov_len = hs->mde[1] + 2; iov[iov_elems].iov_len = hs->mde[1] + 2;