diff --git a/src/cntlr_map.c b/src/cntlr_map.c index ee672b03c4c3097bcda98d3928e354281048c80b..4a537ddb2b9cc73145f996cb7a351734e59976b4 100644 --- a/src/cntlr_map.c +++ b/src/cntlr_map.c @@ -235,6 +235,8 @@ int handle_topology_notification(void *cntlr, struct cmdu_buff *cmdu, struct node *old_n = NULL; if (!s) { + struct cmdu_buff *txcmdu; + s = cntlr_add_sta(c, c->sta_table, ev->macaddr); if (!s) { cntlr_dbg(LOG_STA, "%s: failed to add STA " MACFMT "\n", @@ -247,6 +249,12 @@ int handle_topology_notification(void *cntlr, struct cmdu_buff *cmdu, memcpy(s->bssid, ev->bssid, 6); node_add_sta(n, s); + txcmdu = cntlr_gen_client_caps_query(c, c->almacaddr, s->macaddr, s->bssid); + if (txcmdu) { + send_cmdu(c, txcmdu); + cmdu_free(txcmdu); + } + goto inform_steer_plugins; } @@ -261,10 +269,18 @@ int handle_topology_notification(void *cntlr, struct cmdu_buff *cmdu, } if (!node_find_sta(n, ev->macaddr)) { + struct cmdu_buff *txcmdu; + time(&s->assoc_time); s->state = STA_ASSOCIATED; memcpy(s->bssid, ev->bssid, 6); node_add_sta(n, s); + + txcmdu = cntlr_gen_client_caps_query(c, c->almacaddr, s->macaddr, s->bssid); + if (txcmdu) { + send_cmdu(c, txcmdu); + cmdu_free(txcmdu); + } } } else { if (!s) { @@ -618,8 +634,18 @@ int handle_topology_response(void *cntlr, struct cmdu_buff *cmdu, struct node *n s->de_sta->conn_time = conntime; s->state = conntime != 0 ? STA_ASSOCIATED : STA_DISCONNECTED; if (old_state != STA_ASSOCIATED && s->state == STA_ASSOCIATED) { + struct cmdu_buff *txcmdu; + node_add_sta(n, s); time(&s->assoc_time); + txcmdu = cntlr_gen_client_caps_query(c, + c->almacaddr, + s->macaddr, + s->bssid); + if (txcmdu) { + send_cmdu(c, txcmdu); + cmdu_free(txcmdu); + } } else if (old_state != STA_DISCONNECTED && s->state == STA_DISCONNECTED) { node_del_sta(n, s); time(&s->disassoc_time);