Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: use correct address for mesh Path Error
@ 2009-07-14  0:00 Andrey Yurovsky
  0 siblings, 0 replies; only message in thread
From: Andrey Yurovsky @ 2009-07-14  0:00 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, Andrey Yurovsky

From: Javier Cardona <javier@cozybit.com>

For forwarded frames, we save the precursor address in addr1 in case it
needs to be used to send a Path Error.  mesh_path_discard_frame,
however, was using addr2 instead of addr1 to send Path Error frames, so
correct that and also make the comment regarding this more clear.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
---
 net/mac80211/mesh_pathtbl.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 1981af9..1ede8cb 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -507,8 +507,10 @@ void mesh_path_tx_pending(struct mesh_path *mpath)
  * @skb: frame to discard
  * @sdata: network subif the frame was to be sent through
  *
- * If the frame was beign forwarded from another MP, a PERR frame will be sent
- * to the precursor.
+ * If the frame was being forwarded from another MP, a PERR frame will be sent
+ * to the precursor.  The precursor's address (i.e. the previous hop) was saved
+ * in addr1 of the frame-to-be-forwarded, and would only be overwritten once
+ * the destination is successfully resolved.
  *
  * Locking: the function must me called within a rcu_read_lock region
  */
@@ -523,7 +525,7 @@ void mesh_path_discard_frame(struct sk_buff *skb,
 		u8 *ra, *da;
 
 		da = hdr->addr3;
-		ra = hdr->addr2;
+		ra = hdr->addr1;
 		mpath = mesh_path_lookup(da, sdata);
 		if (mpath)
 			dsn = ++mpath->dsn;
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-13 23:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-14  0:00 [PATCH] mac80211: use correct address for mesh Path Error Andrey Yurovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox