aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh_mpm.c
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2016-06-14 03:31:15 (GMT)
committerJouni Malinen <j@w1.fi>2016-06-19 17:18:09 (GMT)
commitd70a8ab1e3da29c7afe148aae19451e66385c2a9 (patch)
treed6a82af16f2b920b8ec8ac7f58d2a4f2d4cbd80d /wpa_supplicant/mesh_mpm.c
parenta151b0e37dd2e16736a01641fe9dd6c6b0fe2fe6 (diff)
downloadhostap-d70a8ab1e3da29c7afe148aae19451e66385c2a9.zip
hostap-d70a8ab1e3da29c7afe148aae19451e66385c2a9.tar.gz
hostap-d70a8ab1e3da29c7afe148aae19451e66385c2a9.tar.bz2
mesh: Ignore crowded peer
The "Accepting Additional Mesh Peerings bit == 0" means the peer cannot accept any more peers, so suppress attempt to open a connection to such a peer. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'wpa_supplicant/mesh_mpm.c')
-rw-r--r--wpa_supplicant/mesh_mpm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index 3f36a60..f77a14c 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -649,6 +649,14 @@ static struct sta_info * mesh_mpm_add_peer(struct wpa_supplicant *wpa_s,
struct sta_info *sta;
int ret;
+ if (elems->mesh_config_len >= 7 &&
+ !(elems->mesh_config[6] & MESH_CAP_ACCEPT_ADDITIONAL_PEER)) {
+ wpa_msg(wpa_s, MSG_DEBUG,
+ "mesh: Ignore a crowded peer " MACSTR,
+ MAC2STR(addr));
+ return NULL;
+ }
+
sta = ap_get_sta(data, addr);
if (!sta) {
sta = ap_sta_add(data, addr);