linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Add missing case to PERR processing
@ 2015-06-10 18:02 Alexis Green
  2015-06-17  8:55 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Alexis Green @ 2015-06-10 18:02 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Jesse Jones

When the nexthop is unable to resolve its own nexthop it will send back a
PERR with a zero target_sn. According to section 13.10.11.4.3 step b in the
2012 standard that perr should be forwarded and the associated mpath->sn
should be incremented. Neither one of those was happening whichis rather
bad because the originator was not told that packets are black holing.

Signed-off-by: Alexis Green <agreen@cococorp.com>
CC: Jesse Jones <jjones@cococorp.com>

---

diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 3c7cf3c..28c18cb 100755
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -736,9 +736,12 @@ static void hwmp_perr_frame_process(struct ieee80211_sub_if_data *sdata,
 		if (mpath->flags & MESH_PATH_ACTIVE &&
 		    ether_addr_equal(ta, sta->sta.addr) &&
 		    (!(mpath->flags & MESH_PATH_SN_VALID) ||
-		    SN_GT(target_sn, mpath->sn))) {
+		    SN_GT(target_sn, mpath->sn)  || target_sn == 0)) {
 			mpath->flags &= ~MESH_PATH_ACTIVE;
-			mpath->sn = target_sn;
+			if (target_sn != 0)
+				mpath->sn = target_sn;
+			else
+				mpath->sn += 1;
 			spin_unlock_bh(&mpath->state_lock);
 			if (!ifmsh->mshcfg.dot11MeshForwarding)
 				goto endperr;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: Add missing case to PERR processing
  2015-06-10 18:02 [PATCH] mac80211: Add missing case to PERR processing Alexis Green
@ 2015-06-17  8:55 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-06-17  8:55 UTC (permalink / raw)
  To: agreen; +Cc: linux-wireless, Jesse Jones

On Wed, 2015-06-10 at 11:02 -0700, Alexis Green wrote:
> When the nexthop is unable to resolve its own nexthop it will send back a
> PERR with a zero target_sn. According to section 13.10.11.4.3 step b in the
> 2012 standard that perr should be forwarded and the associated mpath->sn
> should be incremented. Neither one of those was happening whichis rather
> bad because the originator was not told that packets are black holing.

Applied.

johannes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-17  8:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10 18:02 [PATCH] mac80211: Add missing case to PERR processing Alexis Green
2015-06-17  8:55 ` Johannes Berg

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).