[PATCH v2 10/11] nl80211: also add no preauth flag on connect

Markus Theil <[email protected]>
Newsgroups gmane.linux.drivers.hostap
Message-ID <[email protected]>
This patch disables receiving pre-auth frames over the nl80211 control port.

Signed-off-by: Markus Theil <[email protected]>
---
 src/drivers/driver_nl80211.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 3da94fd69..5b85cff04 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -467,7 +467,8 @@ int send_and_recv_msgs_as_owner(struct wpa_driver_nl80211_data *drv,
 		if (nla_put_flag(msg, NL80211_ATTR_CONTROL_PORT_OVER_NL80211) ||
 		    nla_put_flag(msg, NL80211_ATTR_SOCKET_OWNER) ||
 		    nla_put_u16(msg, NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
-				ETH_P_PAE))
+				ETH_P_PAE) ||
+		    nla_put_flag(msg, NL80211_ATTR_CONTROL_PORT_NO_PREAUTH))
 			goto out;
 
 	return send_and_recv(drv->global, handle ? handle : drv->global->nl,
-- 
2.26.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.