2013-05-16 16:49:24

by Johannes Berg

[permalink] [raw]
Subject: [PATCH v2 3.10] cfg80211: fix sending WoWLAN TCP wakeup settings

From: Johannes Berg <[email protected]>

The code sending the current WoWLAN TCP wakeup settings in
nl80211_send_wowlan_tcp() is not closing the nested attribute,
thus causing the parser to get confused on the receiver side
in userspace (iw). Fix this.

Cc: [email protected] [3.9]
Reported-by: Deepak Arora <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
---
net/wireless/nl80211.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 0dca987..dfdb5e6 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -7577,6 +7577,8 @@ static int nl80211_send_wowlan_tcp(struct sk_buff *msg,
&tcp->payload_tok))
return -ENOBUFS;

+ nla_nest_end(msg, nl_tcp);
+
return 0;
}

--
1.8.0