From patchwork Fri Feb 9 15:18:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Berg X-Patchwork-Id: 1897115 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=pP2UVFwm; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=mNOeRTo3; 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 4TWcwS0Hxpz23j5 for ; Sat, 10 Feb 2024 02:19:51 +1100 (AEDT) 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:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KQ8B6qqifqp9oG5fquM8hI8ZcP5/gPyNG4rJsfiFyRw=; b=pP2UVFwmiDVu4H i/8uQb5R9FWNN0+epqbHffLvml+QGboiuQzxpxBqXjdCmwSQsm45S/pw5oYzwGzuyqNn/sI3Bgahk E6gsmOTm1Gvd044CR5/luwhiDMeYrVm2U12rfqDZZOhvwuRIGcm65eSJO0451TDnSBqpAGp+aTICy 0XqzVs+dK87fd5h1ZTx97L8wSgLVeaiebUuBVOpYD+TCOim1jlF+KYg6v7s0TKDjf8z5O/GlBg3qq Z36onvxpoNRhnAStoRpmLoL47H/BSz7S66r+NOTVT1gIRw/Z88Y8FebHrmuc84E9CkA1vclPaPSiZ DMeFoFEvJTMnelnMmr9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYSf0-0000000HLY7-42mH; Fri, 09 Feb 2024 15:19:26 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYSer-0000000HLTf-48p3 for hostap@lists.infradead.org; Fri, 09 Feb 2024 15:19:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=OM/RO7rz8ne2lHOehqlWi24V3y6la7kKSB51mr+mqhk=; t=1707491957; x=1708701557; b=mNOeRTo3pFABMD59t9yDDqPdAh+KWdbC0rktSa1G2izVmob QztvF4SvPyA0ODVMewWPxJyLo9hcZnLFilc4H4NdD4dQRCZsN+mbQmrSgqRZAlX1rtbPQn2idFPTf 70xnQhfksczr/BWjmTlwbAVHwyEB9uKUmxsZPU61qitE9GRmVjU3OsspTzRedb61/7Q8Wtjnihfb5 Q4OAy1ZTVva1pr/QxnLhu1n/iDmI3orAUklZD7W8wR8SSr2qqLDbXV4S7NqIMoVKHFXaBOi79HcZ3 VuFjRK8tyMxxhNYllA2pCauGnNJmKN/5iRRKHOjhj8AqYTqfyfr6XcmY/czIu0Cw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rYSep-00000001CRa-1OFH; Fri, 09 Feb 2024 16:19:15 +0100 From: benjamin@sipsolutions.net To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 5/9] WNM: Drop check for current_ssid Date: Fri, 9 Feb 2024 16:18:55 +0100 Message-ID: <20240209151859.972886-6-benjamin@sipsolutions.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240209151859.972886-1-benjamin@sipsolutions.net> References: <20240209151859.972886-1-benjamin@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240209_071918_050243_6C383D5D X-CRM114-Status: GOOD ( 10.05 ) X-Spam-Score: -0.2 (/) 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: From: Benjamin Berg It should never be NULL. In the unlikely event that it is NULL, the logic changes slightly to reject all candidates. Signed-off-by: Benjamin Berg --- wpa_supplicant/wnm_sta.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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.0 T_SCC_BODY_TEXT_LINE No description available. 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 From: Benjamin Berg It should never be NULL. In the unlikely event that it is NULL, the logic changes slightly to reject all candidates. Signed-off-by: Benjamin Berg --- wpa_supplicant/wnm_sta.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c index bf0314454..913a9f034 100644 --- a/wpa_supplicant/wnm_sta.c +++ b/wpa_supplicant/wnm_sta.c @@ -795,8 +795,7 @@ compare_scan_neighbor_results(struct wpa_supplicant *wpa_s, os_time_t age_secs, continue; } - if (wpa_s->current_ssid && - !wpa_scan_res_match(wpa_s, 0, target, wpa_s->current_ssid, + if (!wpa_scan_res_match(wpa_s, 0, target, wpa_s->current_ssid, 1, 0)) { wpa_printf(MSG_DEBUG, "Candidate BSS " MACSTR " (pref %d) does not match the current network profile",