diff mbox

[PATCHv2,1/1] mac80211: Rewrote code for checking if destinations are proxied.

Message ID 4D2AAAC7.6000608@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Joel A Fernandes Jan. 10, 2011, 6:44 a.m. UTC
None
diff mbox

Patch

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 5950e3a..5173fc6 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1815,19 +1815,18 @@  netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
             mppath = mpp_path_lookup(skb->data, sdata);
 
         /*
-         * Do not use address extension, if it is a packet from
-         * the same interface and the destination is not being
-         * proxied by any other mest point.
+         * Use address extension if it is a packet from another interface or if
+         * we know the destination is being proxied by a portal (i.e. portal address
+         * differs from proxied address)
          */
         if (compare_ether_addr(sdata->vif.addr,
                        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,
                     skb->data, skb->data + ETH_ALEN);
             meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr,
                     sdata, NULL, NULL);
         } else {
-            /* packet from other interface */
             int is_mesh_mcast = 1;
             const u8 *mesh_da;