mesh: Generate proper AID for peer

IEEE Std 802.11-2012 13.3.1 states that the AID should be generated on
the local node for each peer. Previously, we were using the peer link ID
(generated by the peer) which may not be unique among all peers. Correct
this by reusing the AP AID generation code.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
This commit is contained in:
Bob Copeland 2015-10-05 08:16:40 -04:00 committed by Jouni Malinen
parent 41d621075e
commit 681753f23c
3 changed files with 10 additions and 3 deletions

View file

@ -1210,7 +1210,7 @@ static void handle_auth(struct hostapd_data *hapd,
}
static int hostapd_get_aid(struct hostapd_data *hapd, struct sta_info *sta)
int hostapd_get_aid(struct hostapd_data *hapd, struct sta_info *sta)
{
int i, j = 32, aid;