mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Add wpa_supplicant ctrl iface support to scan for a specific BSSID
Add support to scan for a specific BSSID through the wpa_supplicant
control interface.
Usage: wpa_cli scan bssid=ab:bc:cd🇩🇪ef:12
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
854d0de3d7
commit
267fc0dd33
@ -7991,6 +7991,19 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params,
|
||||
goto done;
|
||||
}
|
||||
|
||||
pos = os_strstr(params, "bssid=");
|
||||
if (pos) {
|
||||
u8 bssid[ETH_ALEN];
|
||||
|
||||
pos += 6;
|
||||
if (hwaddr_aton(pos, bssid)) {
|
||||
wpa_printf(MSG_ERROR, "Invalid BSSID %s", pos);
|
||||
*reply_len = -1;
|
||||
goto done;
|
||||
}
|
||||
os_memcpy(wpa_s->next_scan_bssid, bssid, ETH_ALEN);
|
||||
}
|
||||
|
||||
pos = params;
|
||||
while (pos && *pos != '\0') {
|
||||
if (os_strncmp(pos, "ssid ", 5) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user