All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 6/7] station: check supported frequencies in neighbor report
@ 2022-02-25 23:32 James Prestwood
  0 siblings, 0 replies; only message in thread
From: James Prestwood @ 2022-02-25 23:32 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]

If the report has an unsupported frequency don't add it to the list.
---
 src/station.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/station.c b/src/station.c
index 637d03d1..00f3d178 100644
--- a/src/station.c
+++ b/src/station.c
@@ -1712,6 +1712,8 @@ static void parse_neighbor_report(struct station *station,
 	struct scan_freq_set *freq_set_md, *freq_set_no_md;
 	uint32_t current_freq = 0;
 	struct handshake_state *hs = netdev_get_handshake(station->netdev);
+	const struct scan_freq_set *supported =
+				wiphy_get_supported_freqs(station->wiphy);
 
 	freq_set_md = scan_freq_set_new();
 	freq_set_no_md = scan_freq_set_new();
@@ -1748,6 +1750,10 @@ static void parse_neighbor_report(struct station *station,
 		if (!(band & wiphy_get_supported_bands(station->wiphy)))
 			continue;
 
+		/* Skip if frequency is not supported */
+		if (!scan_freq_set_contains(supported, freq))
+			continue;
+
 		if (!memcmp(info.addr,
 				station->connected_bss->addr, ETH_ALEN)) {
 			/*
-- 
2.34.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-25 23:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-25 23:32 [PATCH v3 6/7] station: check supported frequencies in neighbor report James Prestwood

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.