From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 2/3] cfg80211: mark regdomains with > NL80211_MAX_SUPP_REG_RULES invalid
Date: Fri, 07 Nov 2008 22:06:02 +0100 [thread overview]
Message-ID: <1226091963.11203.12.camel@johannes.berg> (raw)
In-Reply-To: <1226004327-10290-3-git-send-email-lrodriguez@atheros.com>
[-- Attachment #1: Type: text/plain, Size: 971 bytes --]
On Thu, 2008-11-06 at 12:45 -0800, Luis R. Rodriguez wrote:
> Lets remain consistent and mark rds with > NL80211_MAX_SUPP_REG_RULES
> number of reg rules as invalid in is_valid_rd().
>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Seems fine, if that's not userspace triggerable, but it isn't, right?
Acked-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> net/wireless/reg.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/net/wireless/reg.c b/net/wireless/reg.c
> index f8e7beb..f0ff3d1 100644
> --- a/net/wireless/reg.c
> +++ b/net/wireless/reg.c
> @@ -352,6 +352,9 @@ static bool is_valid_rd(const struct ieee80211_regdomain *rd)
> if (!rd->n_reg_rules)
> return false;
>
> + if (WARN_ON(rd->n_reg_rules > NL80211_MAX_SUPP_REG_RULES))
> + return false;
> +
> for (i = 0; i < rd->n_reg_rules; i++) {
> reg_rule = &rd->reg_rules[i];
> if (!is_valid_reg_rule(reg_rule))
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2008-11-07 21:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-06 20:45 [PATCH v2 0/3] cfg80211/mac80211: Add 802.11d support Luis R. Rodriguez
2008-11-06 20:45 ` [PATCH v2 1/3] cfg80211: call_crda() won't tell us if CRDA was present Luis R. Rodriguez
2008-11-06 20:45 ` [PATCH v2 2/3] cfg80211: mark regdomains with > NL80211_MAX_SUPP_REG_RULES invalid Luis R. Rodriguez
2008-11-06 20:45 ` [PATCH 3/3] cfg80211/mac80211: Add 802.11d support Luis R. Rodriguez
2008-11-06 20:56 ` Luis R. Rodriguez
2008-11-07 21:06 ` Johannes Berg [this message]
2008-11-07 21:12 ` [PATCH v2 2/3] cfg80211: mark regdomains with > NL80211_MAX_SUPP_REG_RULES invalid Luis R. Rodriguez
2008-11-07 21:05 ` [PATCH v2 1/3] cfg80211: call_crda() won't tell us if CRDA was present Johannes Berg
2008-11-07 21:02 ` [PATCH v2 0/3] cfg80211/mac80211: Add 802.11d support Johannes Berg
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=1226091963.11203.12.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
/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).