station: check for matching SSID in Roam()

This is a debug method, but still should verify the SSID in the
target matches the current BSS.
This commit is contained in:
James Prestwood 2022-08-10 16:16:15 -07:00 committed by Denis Kenzior
parent 143b346a4b
commit 99a71ee819
1 changed files with 7 additions and 0 deletions

View File

@ -4346,6 +4346,13 @@ static struct l_dbus_message *station_force_roam(struct l_dbus *dbus,
if (!target || target == station->connected_bss)
return dbus_error_invalid_args(message);
if (station->connected_bss->ssid_len != target->ssid_len)
goto invalid_args;
if (memcmp(station->connected_bss->ssid, target->ssid,
target->ssid_len))
goto invalid_args;
l_debug("Attempting forced roam to BSS "MAC, MAC_STR(mac));
/* The various roam routines expect this to be set from scanning */