Skip to contentSkip to conversation

mac80211: Add missing case to PERR processing

PATCH Applied Alexis Green 2 participants 2 messages Jun 10, 2015 – Jun 17, 2015 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: Add missing case to PERR processing

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.

---

net/mac80211/mesh_hwmp.c +5 -2
index 3c7cf3c..28c18cb 100755
@@ -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;
maintainer Applied
#1 lore raw
Quoted 5 lines · Alexis Green

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