Re: [PATCH] nl80211: does not allow NEW_STATION and DEL_STATIONfor mesh

From: Johannes Berg
Date: Fri Feb 12 2010 - 07:50:06 EST


On Fri, 2010-02-12 at 10:37 -0200, Thadeu Lima de Souza Cascardo wrote:
> As discussed in linux-wireless mailint list, adding and removing
> stations for mesh topologies is not necessary. Since doing it triggers
> bugs, the sugestion was to simply disable it.
>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxxxxxx>
> Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
> Cc: Simon Raffeiner <sturmflut@xxxxxxxxxxxxxx>
> Cc: Andrey Yurovsky <andrey@xxxxxxxxxxx>
> Cc: Javier Cardona <javier@xxxxxxxxxxx>
> ---
> net/wireless/nl80211.c | 47
> +++++++++++------------------------------------
> 1 files changed, 11 insertions(+), 36 deletions(-)
>
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 5b79ecf..176b8fe 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -2001,6 +2001,10 @@ static int nl80211_new_station(struct sk_buff
> *skb, struct genl_info *info)
>
> memset(&params, 0, sizeof(params));
>
> + if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
> + dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN)
> + return -EINVAL;
> +
> if (!info->attrs[NL80211_ATTR_MAC])
> return -EINVAL;

You clearly didn't ever try this code.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part