aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/hostapd.h
diff options
context:
space:
mode:
authorSrinivasa Duvvuri <sduvvuri@google.com>2016-01-31 02:45:30 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-06 19:22:29 (GMT)
commit9684c7567ee904680faf265dc881664a668feaec (patch)
tree0fa92e3a1cf5268d281dffcb026536c15615b96e /src/ap/hostapd.h
parent83fe38b011e7dfd6b73c40cef8c5d74d52ad3389 (diff)
downloadhostap-9684c7567ee904680faf265dc881664a668feaec.zip
hostap-9684c7567ee904680faf265dc881664a668feaec.tar.gz
hostap-9684c7567ee904680faf265dc881664a668feaec.tar.bz2
mesh: Fix peer link counting when a mesh peer reconnects
When a mesh point reconnects by starting from Authentication frame sequence, the plink count was not decremented from its last connection. This resulted in leaking peer link count and causing wpa_supplicant to reject the connection after max_peer_links (default: 99) reconnects. This was reproduced by pre-configuring 2 mesh points with mesh credentials. Boot both mesh points and make sure they connect to each other. Then in a loop reboot one of the mesh points after it successfully connects while leaving the other mesh point up and running. After 99 iterations the supplicant on mesh point that is not rebooting will reject the connection request from the other mesh point. Fix this by decrementing num_plinks when freeing a STA entry that is still in PLINK_ESTAB state. Signed-off-by: Srinivasa Duvvuri <sduvvuri@chromium.org>
Diffstat (limited to 'src/ap/hostapd.h')
-rw-r--r--src/ap/hostapd.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index b3d702e..0f31dd4 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -258,7 +258,8 @@ struct hostapd_data {
#ifdef CONFIG_MESH
int num_plinks;
int max_plinks;
- void (*mesh_sta_free_cb)(struct sta_info *sta);
+ void (*mesh_sta_free_cb)(struct hostapd_data *hapd,
+ struct sta_info *sta);
struct wpabuf *mesh_pending_auth;
struct os_reltime mesh_pending_auth_time;
#endif /* CONFIG_MESH */