diff --git a/src/cntlr_map.c b/src/cntlr_map.c index 0bf45bfed4c30a9d6436767bc79d31bf6aec9974..808f6c41b939636f53b056b0d3441262bb6b6fe7 100644 --- a/src/cntlr_map.c +++ b/src/cntlr_map.c @@ -246,6 +246,7 @@ int handle_topology_notification(void *cntlr, struct cmdu_buff *cmdu, node_del_sta(old_n, s); } + memcpy(s->de_sta->bssid, ev->bssid, 6); node_add_sta(n, s); txcmdu = cntlr_gen_client_caps_query(c, c->almacaddr, s->macaddr, s->bssid); @@ -278,6 +279,7 @@ int handle_topology_notification(void *cntlr, struct cmdu_buff *cmdu, memcpy(s->bssid, ev->bssid, 6); s->state = STA_CONNECTED; + memcpy(s->de_sta->bssid, ev->bssid, 6); node_add_sta(n, s); txcmdu = cntlr_gen_client_caps_query(c, c->almacaddr, s->macaddr, s->bssid); @@ -631,6 +633,7 @@ int handle_topology_response(void *cntlr, struct cmdu_buff *cmdu, struct node *n s->de_sta->conn_time = conntime; s->assoc_time = time(NULL) - conntime; + memcpy(s->de_sta->bssid, bssid, 6); node_add_sta(n, s); cntlr_dbg(LOG_STA, "%s: STA " MACFMT " connected to Node " MACFMT "\n", __func__, MAC2STR(s->macaddr), MAC2STR(n->almacaddr)); diff --git a/src/wifi_dataelements.h b/src/wifi_dataelements.h index 0ede77b73d811947191d0c1a329f8257c0f48d17..e7d86e8ed15d0b977387939cae2cc4927de78240 100644 --- a/src/wifi_dataelements.h +++ b/src/wifi_dataelements.h @@ -292,6 +292,7 @@ struct wifi_sta_element { time_t tsp; /* when the last STA-Link metrics response received */ uint32_t time_delta; /* tsp - time_delta (in ms) = when STA's metrics actually collected */ uint8_t macaddr[6]; + uint8_t bssid[6]; struct wifi_caps_element caps; struct wifi_wifi6_capabilities wifi6caps; uint32_t dl_rate; /* latest data rate in Kbps: ap -> sta */ @@ -360,6 +361,7 @@ struct wifi_bss_element { int invalidate; time_t tsp; uint8_t bssid[6]; + uint8_t ruid[6]; uint8_t ssidlen; char ssid[33]; bool enabled;