Search Linux Wireless

Re: [PATCH v2] Assign next hop address to pending mesh frames once the path is resolved.

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

 



On Thu, 2009-07-09 at 14:42 -0700, Javier Cardona wrote:
> Regression.  Frames transmitted when a mesh path was wating to be resolved were
> being transmitted with an invalid Receiver Address.
> 
> [Changes since v1]
> 
> Suggested by Johannes:
>  - Improved frame_queue traversal
>  - Narower RCU scope
> 
> Signed-off-by: Javier Cardona <javier@xxxxxxxxxxx>
> Signed-off-by: Andrey Yurovsky <andrey@xxxxxxxxxxx>

Reviewed-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

> ---
>  net/mac80211/mesh_pathtbl.c |   18 ++++++++++++++++++
>  1 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
> index ae98766..1981af9 100644
> --- a/net/mac80211/mesh_pathtbl.c
> +++ b/net/mac80211/mesh_pathtbl.c
> @@ -55,7 +55,25 @@ static DEFINE_RWLOCK(pathtbl_resize_lock);
>   */
>  void mesh_path_assign_nexthop(struct mesh_path *mpath, struct sta_info *sta)
>  {
> +	struct sk_buff *skb;
> +	struct ieee80211_hdr *hdr;
> +	struct sk_buff_head tmpq;
> +	unsigned long flags;
> +
>  	rcu_assign_pointer(mpath->next_hop, sta);
> +
> +	__skb_queue_head_init(&tmpq);
> +
> +	spin_lock_irqsave(&mpath->frame_queue.lock, flags);
> +
> +	while ((skb = __skb_dequeue(&mpath->frame_queue)) != NULL) {
> +		hdr = (struct ieee80211_hdr *) skb->data;
> +		memcpy(hdr->addr1, sta->sta.addr, ETH_ALEN);
> +		__skb_queue_tail(&tmpq, skb);
> +	}
> +
> +	skb_queue_splice(&tmpq, &mpath->frame_queue);
> +	spin_unlock_irqrestore(&mpath->frame_queue.lock, flags);
>  }
>  
> 

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