mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
List all neighbors with same score when kicking
The wnm_disassoc_imminent procedure takes a list of neighbor reports to send to the client. Instead of picking just one AP to be sent, send all that have the same score. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
This commit is contained in:
parent
3ba0fa4947
commit
a7a830950a
10 changed files with 211 additions and 153 deletions
|
|
@ -926,7 +926,7 @@ void del_client_interface(uint32_t id, const struct dawn_mac client_addr, uint32
|
|||
|
||||
}
|
||||
|
||||
int wnm_disassoc_imminent(uint32_t id, const struct dawn_mac client_addr, char *dest_ap, uint32_t duration) {
|
||||
int wnm_disassoc_imminent(uint32_t id, const struct dawn_mac client_addr, struct kicking_nr* neighbor_list, uint32_t duration) {
|
||||
struct hostapd_sock_entry *sub;
|
||||
|
||||
blob_buf_init(&b, 0);
|
||||
|
|
@ -934,12 +934,11 @@ int wnm_disassoc_imminent(uint32_t id, const struct dawn_mac client_addr, char *
|
|||
blobmsg_add_u32(&b, "duration", duration);
|
||||
blobmsg_add_u8(&b, "abridged", 1); // prefer aps in neighborlist
|
||||
|
||||
// ToDo: maybe exchange to a list of aps
|
||||
void* nbs = blobmsg_open_array(&b, "neighbors");
|
||||
if (dest_ap != NULL)
|
||||
{
|
||||
blobmsg_add_string(&b, NULL, dest_ap);
|
||||
printf("BSS TRANSITION TO %s\n", dest_ap);
|
||||
while(neighbor_list != NULL) {
|
||||
printf("BSS TRANSITION NEIGHBOR " NR_MACSTR ", Score=%d\n", NR_MAC2STR(neighbor_list->nr), neighbor_list->score);
|
||||
blobmsg_add_string(&b, NULL, neighbor_list->nr);
|
||||
neighbor_list = neighbor_list->next;
|
||||
}
|
||||
|
||||
blobmsg_close_array(&b, nbs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue