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>
This commit is contained in:
parent
a151b0e37d
commit
d70a8ab1e3
2 changed files with 16 additions and 0 deletions
|
@ -1337,6 +1337,14 @@ enum wifi_display_subelem {
|
||||||
#define MESH_PATH_PROTOCOL_VENDOR 255
|
#define MESH_PATH_PROTOCOL_VENDOR 255
|
||||||
#define MESH_PATH_METRIC_AIRTIME 1
|
#define MESH_PATH_METRIC_AIRTIME 1
|
||||||
#define MESH_PATH_METRIC_VENDOR 255
|
#define MESH_PATH_METRIC_VENDOR 255
|
||||||
|
/* IEEE 802.11s - Mesh Capability */
|
||||||
|
#define MESH_CAP_ACCEPT_ADDITIONAL_PEER BIT(0)
|
||||||
|
#define MESH_CAP_MCCA_SUPPORTED BIT(1)
|
||||||
|
#define MESH_CAP_MCCA_ENABLED BIT(2)
|
||||||
|
#define MESH_CAP_FORWARDING BIT(3)
|
||||||
|
#define MESH_CAP_MBCA_ENABLED BIT(4)
|
||||||
|
#define MESH_CAP_TBTT_ADJUSTING BIT(5)
|
||||||
|
#define MESH_CAP_MESH_PS_LEVEL BIT(6)
|
||||||
|
|
||||||
enum plink_action_field {
|
enum plink_action_field {
|
||||||
PLINK_OPEN = 1,
|
PLINK_OPEN = 1,
|
||||||
|
|
|
@ -649,6 +649,14 @@ static struct sta_info * mesh_mpm_add_peer(struct wpa_supplicant *wpa_s,
|
||||||
struct sta_info *sta;
|
struct sta_info *sta;
|
||||||
int ret;
|
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);
|
sta = ap_get_sta(data, addr);
|
||||||
if (!sta) {
|
if (!sta) {
|
||||||
sta = ap_sta_add(data, addr);
|
sta = ap_sta_add(data, addr);
|
||||||
|
|
Loading…
Reference in a new issue