diff options
author | Bob Copeland <me@bobcopeland.com> | 2014-04-15 14:43:08 (GMT) |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-04-22 15:24:50 (GMT) |
commit | bc3ce0b0be6b85e738e80ed25b52ad940f34b921 (patch) | |
tree | aba59c0170fa56dffcc3242e9cbada1f159e6dd2 /net | |
parent | a40a8c17b22ea0ce6d54c04a2e77630768691338 (diff) | |
download | linux-bc3ce0b0be6b85e738e80ed25b52ad940f34b921.tar.xz |
mac80211: mesh: always use the latest target_sn
When a path target responds to a path request, its response
always contains the most up-to-date information; accordingly,
it should use the latest target_sn, regardless of
net_traversal_jiffies(). Otherwise, only the first path
response is considered when constructing a path, as it will
have the highest target_sn of all replies during that period.
Signed-off-by: Bob Copeland <bob@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 03ff5ea..94758b9 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -544,9 +544,10 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata, if (time_after(jiffies, ifmsh->last_sn_update + net_traversal_jiffies(sdata)) || time_before(jiffies, ifmsh->last_sn_update)) { - target_sn = ++ifmsh->sn; + ++ifmsh->sn; ifmsh->last_sn_update = jiffies; } + target_sn = ifmsh->sn; } else if (is_broadcast_ether_addr(target_addr) && (target_flags & IEEE80211_PREQ_TO_FLAG)) { rcu_read_lock(); |