linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mesh: Avoid STA expiration timer truncation to u32
@ 2015-01-16  5:17 Masashi Honma
  2015-01-16  5:49 ` Kalle Valo
  0 siblings, 1 reply; 15+ messages in thread
From: Masashi Honma @ 2015-01-16  5:17 UTC (permalink / raw)
  To: linux-wireless; +Cc: me, Masashi Honma

On some combination of plink_timeout and HZ, the STA expiration timer will be
unexpectedly truncated to u32. Maybe there is a question "Who sets such a large
number to plink_timeout ?". At least wpa_supplicant will set 0xffffffff to
plink_timeout to disable this timer because wpa_supplicant has it's own
expiration mechanism.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
---
 net/mac80211/mesh.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 0c8b2a7..bb721a0 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -574,7 +574,8 @@ static void ieee80211_mesh_housekeeping(struct ieee80211_sub_if_data *sdata)
 	struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
 	u32 changed;
 
-	ieee80211_sta_expire(sdata, ifmsh->mshcfg.plink_timeout * HZ);
+	ieee80211_sta_expire(sdata, ifmsh->mshcfg.plink_timeout *
+			     (unsigned long)HZ);
 	mesh_path_expire(sdata);
 
 	changed = mesh_accept_plinks_update(sdata);
-- 
2.1.0


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

end of thread, other threads:[~2015-02-24 23:24 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-16  5:17 [PATCH] mesh: Avoid STA expiration timer truncation to u32 Masashi Honma
2015-01-16  5:49 ` Kalle Valo
2015-01-16  6:12   ` Masashi Honma
2015-01-16  6:18     ` [PATCH v2] mac80211: " Masashi Honma
2015-01-16 13:31       ` Bob Copeland
2015-01-20  2:44         ` Masashi Honma
2015-01-20  2:47           ` [PATCH v3] " Masashi Honma
2015-01-23  9:42             ` Johannes Berg
2015-01-23 14:27               ` Masashi Honma
2015-02-04  2:22                 ` [PATCH v4] mac80211: Allow 0 for NL80211_MESHCONF_PLINK_TIMEOUT to disable STA expiration Masashi Honma
2015-02-24  9:46                   ` Johannes Berg
     [not found]                     ` <CAFk-A4nyEvsaCah97ohnbLW7a0+GRbnuJGLyFkBLbpWVffn85w@mail.gmail.com>
2015-02-24 10:03                       ` Fwd: " Masashi Honma
2015-02-24 13:42                         ` [PATCH v5] " Masashi Honma
2015-02-24 20:08                           ` Johannes Berg
2015-02-24 23:24                             ` Masashi Honma

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