Commit 9d52501b authored by Joel A Fernandes's avatar Joel A Fernandes Committed by John W. Linville

mac80211: Rewrote code for checking if destinations are proxied.

Rewrote code for checking if the destination is proxied by a mesh portal, to facilitate better
understanding of the functionality.
Signed-off-by: default avatarJoel A Fernandes <agnel.joel@gmail.com>
Acked-by: default avatarJavier Cardona <javier@cozybit.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 04cf53f4
...@@ -1815,19 +1815,19 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, ...@@ -1815,19 +1815,19 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
mppath = mpp_path_lookup(skb->data, sdata); mppath = mpp_path_lookup(skb->data, sdata);
/* /*
* Do not use address extension, if it is a packet from * Use address extension if it is a packet from
* the same interface and the destination is not being * another interface or if we know the destination
* proxied by any other mest point. * is being proxied by a portal (i.e. portal address
* differs from proxied address)
*/ */
if (compare_ether_addr(sdata->vif.addr, if (compare_ether_addr(sdata->vif.addr,
skb->data + ETH_ALEN) == 0 && skb->data + ETH_ALEN) == 0 &&
(!mppath || !compare_ether_addr(mppath->mpp, skb->data))) { !(mppath && compare_ether_addr(mppath->mpp, skb->data))) {
hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc,
skb->data, skb->data + ETH_ALEN); skb->data, skb->data + ETH_ALEN);
meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr, meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr,
sdata, NULL, NULL); sdata, NULL, NULL);
} else { } else {
/* packet from other interface */
int is_mesh_mcast = 1; int is_mesh_mcast = 1;
const u8 *mesh_da; const u8 *mesh_da;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment