[PATCH] mac80211: fix to follow standard

Subsystems: mac80211, the rest

STALE2902d

2 messages, 2 authors, 2018-08-28 · open the first message on its own page

[PATCH] mac80211: fix to follow standard

From: Yuan-Chi Pang <hidden>
Date: 2018-08-28 02:25:13

IEEE 802.11-2016 14.10.8.3 HWMP sequence numbering says:
If it is a target mesh STA, it shall update its own HWMP SN to
maximum (current HWMP SN, target HWMP SN in the PREQ element) + 1
immediately before it generates a PREP element in response to a
PREQ element.

Signed-off-by: Yuan-Chi Pang <redacted>
---
 net/mac80211/mesh_hwmp.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 35ad398..6c21a26 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -572,6 +572,11 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
 		forward = false;
 		reply = true;
 		target_metric = 0;
+
+		if (SN_GT(target_sn, ifmsh->sn)) {
+			ifmsh->sn = target_sn;
+		}
+
 		if (time_after(jiffies, ifmsh->last_sn_update +
 					net_traversal_jiffies(sdata)) ||
 		    time_before(jiffies, ifmsh->last_sn_update)) {
-- 
2.7.4

Re: [PATCH] mac80211: fix to follow standard

From: Sergei Shtylyov <hidden>
Date: 2018-08-28 09:23:41

Hello!

On 8/28/2018 5:24 AM, Yuan-Chi Pang wrote:
quoted hunk
IEEE 802.11-2016 14.10.8.3 HWMP sequence numbering says:
If it is a target mesh STA, it shall update its own HWMP SN to
maximum (current HWMP SN, target HWMP SN in the PREQ element) + 1
immediately before it generates a PREP element in response to a
PREQ element.

Signed-off-by: Yuan-Chi Pang <redacted>
---
  net/mac80211/mesh_hwmp.c | 5 +++++
  1 file changed, 5 insertions(+)
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 35ad398..6c21a26 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -572,6 +572,11 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
  		forward = false;
  		reply = true;
  		target_metric = 0;
+
+		if (SN_GT(target_sn, ifmsh->sn)) {
+			ifmsh->sn = target_sn;
+		}
    No need for {} enclosing a single statement.

[...]

MBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help