All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 2/8] station: check for matching SSID in Roam()
Date: Wed, 10 Aug 2022 16:16:15 -0700	[thread overview]
Message-ID: <20220810231621.372514-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20220810231621.372514-1-prestwoj@gmail.com>

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 8c230b52..57dbd0d5 100644
--- a/src/station.c
+++ b/src/station.c
@@ -4373,6 +4373,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 */
-- 
2.34.3


  reply	other threads:[~2022-08-10 23:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 23:16 [PATCH 1/8] network: make network const in network_bss_list_get_entries James Prestwood
2022-08-10 23:16 ` James Prestwood [this message]
2022-08-10 23:16 ` [PATCH 3/8] station: add debug method GetNetworks James Prestwood
2022-08-11 14:39   ` Denis Kenzior
2022-08-10 23:16 ` [PATCH 4/8] client: add developer mode option (-E) James Prestwood
2022-08-11 14:40   ` Denis Kenzior
2022-08-10 23:16 ` [PATCH 5/8] client: allow entity name to be passed to completion James Prestwood
2022-08-10 23:16 ` [PATCH 6/8] client: add STATION_DEBUG_INTERFACE definition James Prestwood
2022-08-11 14:46   ` Denis Kenzior
2022-08-10 23:16 ` [PATCH 7/8] client: add station-debug command interface James Prestwood
2022-08-10 23:16 ` [PATCH 8/8] client: fix station autocomplete with multiple phys James Prestwood
2022-08-11 14:48   ` Denis Kenzior
2022-08-11 14:39 ` [PATCH 1/8] network: make network const in network_bss_list_get_entries Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220810231621.372514-2-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.