Patchwork [v2] nl80211: fix nla_nest_start conversion

login
register
mail settings
Submitter Johannes Berg
Date April 5, 2013, 8:41 p.m.
Message ID <1365194484-26018-1-git-send-email-johannes@sipsolutions.net>
Download mbox | patch
Permalink /patch/234277/
State Accepted
Commit adc96dc2ad3b9eeeb79ea817dd00f01b97f4073a
Headers show

Comments

Johannes Berg - April 5, 2013, 8:41 p.m.
From: Johannes Berg <johannes.berg@intel.com>

Dmitry reported that the kernel could no longer parse the
scheduled scan attributes correctly after my patch to use
nla_nest_start/nla_nest_end. The reason is that the wrong
attribute is closed I accidentally made it close the full
scan config instead of just the SSID match set.

Reported-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-hostap: Johannes Berg <johannes.berg@intel.com>
---
 src/drivers/driver_nl80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Jouni Malinen - April 23, 2013, 2:20 p.m.
On Fri, Apr 05, 2013 at 10:41:24PM +0200, Johannes Berg wrote:
> Dmitry reported that the kernel could no longer parse the
> scheduled scan attributes correctly after my patch to use
> nla_nest_start/nla_nest_end. The reason is that the wrong
> attribute is closed I accidentally made it close the full
> scan config instead of just the SSID match set.

Thanks, applied.

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index b53e706..3b0dba4 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4004,7 +4004,7 @@  static int wpa_driver_nl80211_sched_scan(void *priv,
 				drv->filter_ssids[i].ssid_len,
 				drv->filter_ssids[i].ssid);
 
-			nla_nest_end(msg, match_sets);
+			nla_nest_end(msg, match_set_ssid);
 		}
 
 		if (params->filter_rssi) {