Commit 039f5577 authored by Yuan-Chi Pang's avatar Yuan-Chi Pang Committed by Kleber Sacilotto de Souza

mac80211: mesh: fix HWMP sequence numbering to follow standard

BugLink: https://bugs.launchpad.net/bugs/1798770

[ Upstream commit 1f631c32 ]

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: default avatarYuan-Chi Pang <fu3mo6goo@gmail.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 5bf8db6f
...@@ -552,6 +552,10 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata, ...@@ -552,6 +552,10 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
forward = false; forward = false;
reply = true; reply = true;
target_metric = 0; target_metric = 0;
if (SN_GT(target_sn, ifmsh->sn))
ifmsh->sn = target_sn;
if (time_after(jiffies, ifmsh->last_sn_update + if (time_after(jiffies, ifmsh->last_sn_update +
net_traversal_jiffies(sdata)) || net_traversal_jiffies(sdata)) ||
time_before(jiffies, ifmsh->last_sn_update)) { time_before(jiffies, ifmsh->last_sn_update)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment