Search Linux Wireless

Re: [PATCH v3 2/2] mac80211: fix race condition between assoc_done and first EAP packet

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

 



On Wed, 2011-08-17 at 15:18 +0300, Guy Eilam wrote:

> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -850,8 +850,21 @@ ieee80211_rx_h_check(struct ieee80211_rx_data *rx)
>  		      ieee80211_is_pspoll(hdr->frame_control)) &&
>  		     rx->sdata->vif.type != NL80211_IFTYPE_ADHOC &&
>  		     rx->sdata->vif.type != NL80211_IFTYPE_WDS &&
> -		     (!rx->sta || !test_sta_flags(rx->sta, WLAN_STA_ASSOC))))
> +		     (!rx->sta || !test_sta_flags(rx->sta, WLAN_STA_ASSOC)))) {
> +		if (rx->sta && rx->sta->dummy &&
> +		    ieee80211_is_data_present(hdr->frame_control)) {
> +			u16 ethertype;
> +			u8 *payload;
> +
> +			payload = rx->skb->data +
> +				ieee80211_hdrlen(hdr->frame_control);
> +			ethertype = (payload[6] << 8) | payload[7];
> +			if (cpu_to_be16(ethertype) ==
> +			    rx->sdata->control_port_protocol)
> +				return RX_CONTINUE;
> +		}
>  		return RX_DROP_MONITOR;
> +	}

It might be easier to read to split the outer condition now into
data/ps-poll?

Anyway, didn't pay attention if this got applied -- seems fine.
 
johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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