From 99a71ee8194e19a8782e5c25db9e9b77ba2633fa Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 10 Aug 2022 16:16:15 -0700 Subject: [PATCH] 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. --- src/station.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/station.c b/src/station.c index 17a48670..83eee28c 100644 --- a/src/station.c +++ b/src/station.c @@ -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 */