Search Linux Wireless

Re: [PATCH 1/1] mac80211: filter probes in ieee80211_rx_mgmt_probe_resp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2008-08-03 at 14:32 +0300, Tomas Winkler wrote:
> This patch moves filtering statement from ieee80211_rx_bss_info
> which is called for both beacon and probe to ieee80211_rx_mgmt_probe_resp
> and save few cycles in beacon parsing.

Sounds alright to me, but maybe we should then document that
rx_bss_info() only expects data for the right BSSID?

> Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
> ---
>  net/mac80211/mlme.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index 5358420..0800385 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -2570,9 +2570,6 @@ static void ieee80211_rx_bss_info(struct net_device *dev,
>  	DECLARE_MAC_BUF(mac);
>  	DECLARE_MAC_BUF(mac2);
>  
> -	if (!beacon && memcmp(mgmt->da, dev->dev_addr, ETH_ALEN))
> -		return; /* ignore ProbeResp to foreign address */
> -
>  	beacon_timestamp = le64_to_cpu(mgmt->u.beacon.timestamp);
>  
>  	if (ieee80211_vif_is_mesh(&sdata->vif) && elems->mesh_id &&
> @@ -2890,6 +2887,9 @@ static void ieee80211_rx_mgmt_probe_resp(struct net_device *dev,
>  	size_t baselen;
>  	struct ieee802_11_elems elems;
>  
> +	if (memcmp(mgmt->da, dev->dev_addr, ETH_ALEN))
> +		return; /* ignore ProbeResp to foreign address */
> +
>  	baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt;
>  	if (baselen > len)
>  		return;

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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux