linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joel A Fernandes <agnel.joel@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org,
	Johannes Berg <johannes@sipsolutions.net>,
	javier@cozybit.com, devel@lists.open80211s.org
Subject: [PATCHv2 1/1] mac80211: Rewrote code for checking if destinations are proxied.
Date: Mon, 10 Jan 2011 00:44:23 -0600	[thread overview]
Message-ID: <4D2AAAC7.6000608@gmail.com> (raw)

Rewrote code for checking if the destination is proxied by a mesh portal, to facilitate better
understanding of the functionality.

Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com>
Acked-by: Javier Cardona <javier@cozybit.com>
--
These changes are incremental to the patch "mac80211: Fix mesh portal communication with other mesh nodes"
which was merged into wireless-testing (commit f76b57b47e5fd423f9827c7b0ba7bbd06cca6b9b).
Resending the patch as v2 because Thunderbird managed to mess up the formatting yet again.
--
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;


                 reply	other threads:[~2011-01-10  6:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D2AAAC7.6000608@gmail.com \
    --to=agnel.joel@gmail.com \
    --cc=devel@lists.open80211s.org \
    --cc=javier@cozybit.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).