On Mon, 2013-02-18 at 19:16 +0800, Chun-Yeow Yeoh wrote:
> Unicast frame with unknown forwarding information always trigger
> the path discovery assuming destination is always located inside the
> MBSS. This patch allows the forwarding to look for mesh gate if path
> discovery inside the MBSS has failed.
> 
> Reported-by: Cedric Voncken <[email protected]>
> Signed-off-by: Chun-Yeow Yeoh <[email protected]>
> ---
>  net/mac80211/tx.c |   15 ++++++++++++---
>  1 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index 5b9602b..dce3af3 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -1844,9 +1844,18 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff 
> *skb,
>               }
>  
>               if (!is_multicast_ether_addr(skb->data)) {
> -                     mpath = mesh_path_lookup(sdata, skb->data);
> -                     if (!mpath)
> -                             mppath = mpp_path_lookup(sdata, skb->data);
> +                     struct sta_info *next_hop;
> +
> +                     mpath = mesh_path_lookup(skb->data, sdata);
> +                     if (mpath)
> +                             next_hop = rcu_dereference(mpath->next_hop);
> +
> +                     if (!mpath || (mpath && (!next_hop ||
> +                                     !(mpath->flags & MESH_PATH_ACTIVE))))
> +                             mppath = mpp_path_lookup(skb->data, sdata);

Heck, even the logic is wrong. Ok actually just weird -- if (!mpath || !
next_hop || ...) would be totally sufficient.

> +                     if (mppath && mpath)
> +                             mesh_path_del(mpath->dst, mpath->sdata);

You really delete paths because packets are transmitted along them?

johannes

_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

Reply via email to