diff mbox

mesh: Skip STA expiration on user_mpm mode

Message ID 1421202189-4020-1-git-send-email-masashi.honma@gmail.com (mailing list archive)
State Rejected
Delegated to: Johannes Berg
Headers show

Commit Message

Masashi Honma Jan. 14, 2015, 2:23 a.m. UTC
The mesh STA expiration processing works even if user_mpm mode. This causes
unexpected STA disconnection.

This patch skips STA expiration processing on user_mpm mode.

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

Comments

Bob Copeland Jan. 15, 2015, 3:14 a.m. UTC | #1
On Tue, Jan 13, 2015 at 9:23 PM, Masashi Honma <masashi.honma@gmail.com> wrote:
> The mesh STA expiration processing works even if user_mpm mode. This causes
> unexpected STA disconnection.
>
> This patch skips STA expiration processing on user_mpm mode.
>
> Signed-off-by: Masashi Honma <masashi.honma@gmail.com>

>
> -       ieee80211_sta_expire(sdata, ifmsh->mshcfg.plink_timeout * HZ);
> +       if (!ifmsh->user_mpm)
> +               ieee80211_sta_expire(sdata, ifmsh->mshcfg.plink_timeout * HZ);

I took a look at what authsae is doing, and it looks like it's just
prepared to handle the NL80211_CMD_DEL_STATION events generated from
cfg80211_del_sta() -- is there a reason that couldn't work for wpa_s
too?  Then you'd only need the patch to configure that timeout on the
client, and you can simplify it by not caring about user_mpm.
Masashi Honma Jan. 16, 2015, 2:04 a.m. UTC | #2
2015-01-15 12:14 GMT+09:00 Bob Copeland <me@bobcopeland.com>:
> I took a look at what authsae is doing, and it looks like it's just
> prepared to handle the NL80211_CMD_DEL_STATION events generated from
> cfg80211_del_sta() -- is there a reason that couldn't work for wpa_s
> too?  Then you'd only need the patch to configure that timeout on the
> client, and you can simplify it by not caring about user_mpm.

Thank you for your review.

Indeed wpa_supplicant do nothing even if it receivced NL80211_CMD_DEL_STATION.
But the mismatch (wpa_supplicant recognizes STA is alive, mac80211
recognizes STA leaved) is not so good.

Anyway I have not considered authsae user land application.
Does authsae have it's own inactivity timer ?
If not, I will drop this patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bob Copeland Jan. 16, 2015, 12:59 p.m. UTC | #3
On Fri, Jan 16, 2015 at 11:04:30AM +0900, Masashi Honma wrote:
> 2015-01-15 12:14 GMT+09:00 Bob Copeland <me@bobcopeland.com>:
> > I took a look at what authsae is doing, and it looks like it's just
> > prepared to handle the NL80211_CMD_DEL_STATION events generated from
> > cfg80211_del_sta() -- is there a reason that couldn't work for wpa_s
> > too?  Then you'd only need the patch to configure that timeout on the
> > client, and you can simplify it by not caring about user_mpm.
> 
> Thank you for your review.
> 
> Indeed wpa_supplicant do nothing even if it receivced NL80211_CMD_DEL_STATION.
> But the mismatch (wpa_supplicant recognizes STA is alive, mac80211
> recognizes STA leaved) is not so good.

Right - so wpa_s could be changed to handle this event (for mesh),
I think.

> Anyway I have not considered authsae user land application.
> Does authsae have it's own inactivity timer ?
> If not, I will drop this patch.

No, it relies on mac80211's inactivity timer.  So, yeah, I think this
patch would break authsae, in the sense that stations would never
get removed.
Masashi Honma Jan. 18, 2015, 11:33 p.m. UTC | #4
2015-01-16 21:59 GMT+09:00 Bob Copeland <me@bobcopeland.com>:
> No, it relies on mac80211's inactivity timer.  So, yeah, I think this
> patch would break authsae, in the sense that stations would never
> get removed.

I see. I will drop this patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 0c8b2a7..50174fd 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);
+	if (!ifmsh->user_mpm)
+		ieee80211_sta_expire(sdata, ifmsh->mshcfg.plink_timeout * HZ);
 	mesh_path_expire(sdata);
 
 	changed = mesh_accept_plinks_update(sdata);