From patchwork Sun Apr 28 13:13:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Bauer X-Patchwork-Id: 1928659 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=oKelXLkG; dkim=fail reason="signature verification failed" (4096-bit key; secure) header.d=david-bauer.net header.i=@david-bauer.net header.a=rsa-sha256 header.s=uberspace header.b=OTYsIfSG; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VS6Pl52nJz23t4 for ; Sun, 28 Apr 2024 23:14:50 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0aHt7QmP95FAGpx0lzgS4COuAa2BYOejJwPLQKmyAOQ=; b=oKelXLkGU6yjHh jX0fccfAwutloqy0LaZjqzA7IadJpULsIl7V/p9Kds1qrT3Q5MCcW0Q3k9Z/YmL2PC3SLD8+u/cLq 8UGXHH1tovk19nZXSLm9QpYZtRajHN9YhuRe8DJg0Na6/RkvoC4nc3BtyUIXaNnkqInZ/5eG9Vbwn PtmC6XvpCif2ZBJJ6JYWULJFQ3Xm+tK5eoxqIMryasOdz7xzcv2BgrieYPpu8pU5xLyH2i1jhAE3k R8Q5bSk5UHy0a9B901wTB988PuC9RmW8hRPsD7b9zXYsCtKJOL6rvQ8yfNHVExGKOE0AQ8w5fORB1 k/jewLYlnb2drXs2pCXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s14MH-000000000L5-3dUk; Sun, 28 Apr 2024 13:14:21 +0000 Received: from perseus.uberspace.de ([95.143.172.134]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s14M5-000000000Dl-09RB for hostap@lists.infradead.org; Sun, 28 Apr 2024 13:14:14 +0000 Received: (qmail 7412 invoked by uid 988); 28 Apr 2024 13:13:59 -0000 Authentication-Results: perseus.uberspace.de; auth=pass (plain) Received: from unknown (HELO unkown) (::1) by perseus.uberspace.de (Haraka/3.0.1) with ESMTPSA; Sun, 28 Apr 2024 15:13:59 +0200 From: David Bauer To: hostap@lists.infradead.org Subject: [PATCH v2 4/5] bgscan: add OWE transition SSID to OWE network scan Date: Sun, 28 Apr 2024 15:13:43 +0200 Message-ID: <20240428131344.334314-5-mail@david-bauer.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240428131344.334314-1-mail@david-bauer.net> References: <20240428131344.334314-1-mail@david-bauer.net> MIME-Version: 1.0 X-Rspamd-Bar: - X-Rspamd-Report: MID_CONTAINS_FROM(1) BAYES_HAM(-3) MIME_GOOD(-0.1) R_MISSING_CHARSET(0.5) X-Rspamd-Score: -1.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=david-bauer.net; s=uberspace; h=from:to:subject:date; bh=as3GubP9YZmHSOx8qVyuvg6/nay/gECwM0jtQ11TWw0=; b=OTYsIfSGap+haVwFkK7/7jI9qhmKFXa6JkdSK+SmMVEFqyH5Q62kCmlMBLxWyPjFlNN6dq34fX +xoisv6++kWIbUbCYpb5ZunVeTby0t+j2OVb8gmYU9+HuN08ohAdvOfyW+aMdmSp0eJhArjDKMvt 8Y3hoOpsDEg9l+E2AoXacEW++fpThKhYEk//PW5Sj3VL29jT+h3fHt3dw7YpWq2irEbQ17YSVSd5 SP+LiaaZOPkt/2qcTZcPpQGkHKZgU3i56tnljKu3jV699TuokVTQa0GIpedgEiLUmy1mWrS5pAbX x+CT4yRRXG6TgrvchnmISFhdylged2gkxWPcEKLZex+kY8281wNnUcGdIpLyn2rSVkjpI4G+hR4Q SFoaFOxx2/6brJA5lwuEbDZRAwitwz60n8C7METP6blqwIoz7CBzBPGc+Tx08dYcHg0toU32hSof OBzxK1Si72IT4diwy+W/SJjwDyrMLfBnctJq5egSXMj6oRrs2hJhmVHmT5nP9wj28nDBTtZAJLbv zDwBP8BghdXukr5Dmuqg26Zi1b6SnpZm8sQOUGyAN+84va0t3cEke9eiNOC2UMjt6A5u8+ZoQTU9 dhKFWvpu7rY90Xqjy4CDTnN9EHRjIfp4EeRzOxN5fmKtxhPWg+ucQuzFBO5yA+KpS8ajkqz/h0nk k= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240428_061409_468807_D1D3CE80 X-CRM114-Status: GOOD ( 12.16 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Add transition SSIDs to the SSID scan-list. This is currently missing and bgscan fails to scan for SSIDs on the transition network if one is currently used. Signed-off-by: David Bauer --- wpa_supplicant/bgscan_learn.c | 4 ++++ wpa_supplicant/bgscan_simple.c | 3 +++ wpa_supplicant/scan.c | 6 +++--- wpa_supplicant/scan.h | 3 +++ 4 fil [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [95.143.172.134 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add transition SSIDs to the SSID scan-list. This is currently missing and bgscan fails to scan for SSIDs on the transition network if one is currently used. Signed-off-by: David Bauer --- wpa_supplicant/bgscan_learn.c | 4 ++++ wpa_supplicant/bgscan_simple.c | 3 +++ wpa_supplicant/scan.c | 6 +++--- wpa_supplicant/scan.h | 3 +++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/bgscan_learn.c b/wpa_supplicant/bgscan_learn.c index cab4ae2ac..922fe5440 100644 --- a/wpa_supplicant/bgscan_learn.c +++ b/wpa_supplicant/bgscan_learn.c @@ -280,6 +280,10 @@ static void bgscan_learn_timeout(void *eloop_ctx, void *timeout_ctx) params.num_ssids = 1; params.ssids[0].ssid = data->ssid->ssid; params.ssids[0].ssid_len = data->ssid->ssid_len; + + /* Add transition mode SSID of current network */ + wpa_add_owe_scan_ssid(wpa_s, ¶ms, data->ssid, wpa_s->max_scan_ssids - params.num_ssids); + if (data->ssid->scan_freq) params.freqs = data->ssid->scan_freq; else { diff --git a/wpa_supplicant/bgscan_simple.c b/wpa_supplicant/bgscan_simple.c index a90cf86e5..96e5e5a40 100644 --- a/wpa_supplicant/bgscan_simple.c +++ b/wpa_supplicant/bgscan_simple.c @@ -89,6 +89,9 @@ static void bgscan_simple_timeout(void *eloop_ctx, void *timeout_ctx) params.ssids[0].ssid_len = data->ssid->ssid_len; params.freqs = data->ssid->scan_freq; + /* Add transition mode SSID of current network */ + wpa_add_owe_scan_ssid(wpa_s, ¶ms, data->ssid, wpa_s->max_scan_ssids - params.num_ssids); + /* * A more advanced bgscan module would learn about most like channels * over time and request scans only for some channels (probing others diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 52fe89746..8a0387301 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -940,9 +940,9 @@ static void wpa_add_scan_ssid(struct wpa_supplicant *wpa_s, } -static void wpa_add_owe_scan_ssid(struct wpa_supplicant *wpa_s, - struct wpa_driver_scan_params *params, - struct wpa_ssid *ssid, size_t max_ssids) +void wpa_add_owe_scan_ssid(struct wpa_supplicant *wpa_s, + struct wpa_driver_scan_params *params, + const struct wpa_ssid *ssid, size_t max_ssids) { #ifdef CONFIG_OWE struct wpa_bss *bss; diff --git a/wpa_supplicant/scan.h b/wpa_supplicant/scan.h index d4c06c1ae..7ea99928c 100644 --- a/wpa_supplicant/scan.h +++ b/wpa_supplicant/scan.h @@ -104,5 +104,8 @@ int wpas_channel_width_rssi_bump(const u8 *ies, size_t ies_len, enum chan_width cw); int wpas_adjust_snr_by_chanwidth(const u8 *ies, size_t ies_len, enum chan_width max_cw, int snr); +void wpa_add_owe_scan_ssid(struct wpa_supplicant *wpa_s, + struct wpa_driver_scan_params *params, + const struct wpa_ssid *ssid, size_t max_ssids); #endif /* SCAN_H */