linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nl80211: validate number of probe response CSA counters
@ 2016-09-13 13:56 Johannes Berg
  2016-09-15  6:08 ` Coelho, Luciano
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2016-09-13 13:56 UTC (permalink / raw)
  To: linux-wireless; +Cc: Andrei Otcheretianski, Luca Coelho, Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Due to an apparent copy/paste bug, the number of counters for the
beacon configuration were checked twice, instead of checking the
number of probe response counters. Fix this to check the number of
probe response counters before parsing those.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/wireless/nl80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index ef234d2fd854..a65c94f202f8 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -6998,7 +6998,7 @@ static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info)
 
 		params.n_counter_offsets_presp = len / sizeof(u16);
 		if (rdev->wiphy.max_num_csa_counters &&
-		    (params.n_counter_offsets_beacon >
+		    (params.n_counter_offsets_presp >
 		     rdev->wiphy.max_num_csa_counters))
 			return -EINVAL;
 
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nl80211: validate number of probe response CSA counters
  2016-09-13 13:56 [PATCH] nl80211: validate number of probe response CSA counters Johannes Berg
@ 2016-09-15  6:08 ` Coelho, Luciano
  0 siblings, 0 replies; 2+ messages in thread
From: Coelho, Luciano @ 2016-09-15  6:08 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org, johannes@sipsolutions.net
  Cc: Otcheretianski, Andrei, Berg, Johannes

T24gVHVlLCAyMDE2LTA5LTEzIGF0IDE1OjU2ICswMjAwLCBKb2hhbm5lcyBCZXJnIHdyb3RlOg0K
PiBGcm9tOiBKb2hhbm5lcyBCZXJnIDxqb2hhbm5lcy5iZXJnQGludGVsLmNvbT4NCj4gDQo+IER1
ZSB0byBhbiBhcHBhcmVudCBjb3B5L3Bhc3RlIGJ1ZywgdGhlIG51bWJlciBvZiBjb3VudGVycyBm
b3IgdGhlDQo+IGJlYWNvbiBjb25maWd1cmF0aW9uIHdlcmUgY2hlY2tlZCB0d2ljZSwgaW5zdGVh
ZCBvZiBjaGVja2luZyB0aGUNCj4gbnVtYmVyIG9mIHByb2JlIHJlc3BvbnNlIGNvdW50ZXJzLiBG
aXggdGhpcyB0byBjaGVjayB0aGUgbnVtYmVyIG9mDQo+IHByb2JlIHJlc3BvbnNlIGNvdW50ZXJz
IGJlZm9yZSBwYXJzaW5nIHRob3NlLg0KPiANCj4gU2lnbmVkLW9mZi1ieTogSm9oYW5uZXMgQmVy
ZyA8am9oYW5uZXMuYmVyZ0BpbnRlbC5jb20+DQo+IC0tLQ0KDQpBY2tlZC1ieTogTHVjaWFubyBD
b2VsaG8gPGx1Y2lhbm8uY29lbGhvQGludGVsLmNvbT4NCg0KLS0NCkx1Y2Eu

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-15  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13 13:56 [PATCH] nl80211: validate number of probe response CSA counters Johannes Berg
2016-09-15  6:08 ` Coelho, Luciano

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).