From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Arend van Spriel <arend.vanspriel@broadcom.com>
Subject: [PATCH] nl80211: initialize state.filter_wiphy in nl80211_dump_interface()
Date: Thu, 25 Aug 2016 20:20:54 +0100 [thread overview]
Message-ID: <1472152854-3183-1-git-send-email-arend.vanspriel@broadcom.com> (raw)
In nl80211_dump_interface() the filter_wiphy variable was set to -1.
However, that does not help as message may not contain wiphy or wdev
attribute. Instead initialize state.filter_wiphy as is done in
nl80211_dump_wiphy().
Fixes: 2d75da13fbb9 ("nl80211: Allow GET_INTERFACE dumps to be filtered")
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
net/wireless/nl80211.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 95d55d2..681c689 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2525,7 +2525,7 @@ static int nl80211_dump_interface(struct sk_buff *skb, struct netlink_callback *
int if_idx = 0;
int wp_start = cb->args[0];
int if_start = cb->args[1];
- int filter_wiphy = -1;
+ int filter_wiphy;
struct cfg80211_registered_device *rdev;
struct wireless_dev *wdev;
@@ -2534,6 +2534,7 @@ static int nl80211_dump_interface(struct sk_buff *skb, struct netlink_callback *
struct nl80211_dump_wiphy_state state = {};
int ret;
+ state.filter_wiphy = -1;
ret = nl80211_dump_wiphy_parse(skb, cb, &state);
if (ret)
return ret;
--
1.9.1
reply other threads:[~2016-08-25 19:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472152854-3183-1-git-send-email-arend.vanspriel@broadcom.com \
--to=arend.vanspriel@broadcom.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).