From nobody Sun Jul 3 12:28:01 2022 X-Original-To: wireless@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CC3B28BFA87 for ; Sun, 3 Jul 2022 12:28:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LbSrd4hG2z3l76 for ; Sun, 3 Jul 2022 12:28:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81F3624699 for ; Sun, 3 Jul 2022 12:28:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 263CS1NP048402 for ; Sun, 3 Jul 2022 12:28:01 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 263CS13j048401 for wireless@FreeBSD.org; Sun, 3 Jul 2022 12:28:01 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: wireless@FreeBSD.org Subject: [Bug 264238] wpa_supplicant 2.10 fails to associate to open secondary VAP when primary VAP is WPA Date: Sun, 03 Jul 2022 12:28:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: wireless X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: fbsd@opal.com X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: cy@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-wireless List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656851281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dPFbzQUSJWyRb2vD68DGW4gVRkii0peEecZeBRHvZMg=; b=DmLqDFW0Rf4OXBREXTBFkyfpjjQLLtFeB4MCzfO+yVKKCEwjYSTYANdtWaowq69ekY7zIv 5qTkwWvfaNVyNVOcI7wFAoFMLnxjfQnp/RFk8AOCScCQwX1o52L5bzoI56lo5igA4j3YbG ZLpk3/v9i+kmQj3NvsHaRXI5uctt1nMIGB+ID4eF8zae2+F81ZADSGR610oLrjW/3OybQW Nls/D3XIRwXRhJzcegXAVvWG69Gm9YzaUACeDZ2Xtr9EGLej4tOrHaiQRgeHKarXVOrGS+ mmkrYdc2XccGYslZ54PuFJjUKWjkOPf5BodkeBC9WETiPIvk8+POchv78iSB4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656851281; a=rsa-sha256; cv=none; b=yEKPSBeo1kqDa696F1co2HIBqNoFrvFGhZsY+LXZIsnOoOJYO6N7kWrJKaLa97hlQgU+tO MnD3lNi+4dhGE5vJceJB/t4xpJdYeq5yhV9vNv/WYLpO0h9RDjBeI4QusZJji6MG5u/5zK k6gCAAY/mrAmRPrNejfeWhiEz6sVdtQwMlDelAeG8IGrEL3jlF6r7B5O5eGRBAoQqBmp8l Iz3xrD3ucB6vXPvkwPvEU7qGqke1pkJOoGiCxFqGEj3+t4DSKlHHU8O767Qj331ICk3c1A bh32LfzOuyH05H4K+Oqy4yKYuwTaNqaC9P8AbOCw/nmQQKnnCK4ZptitkkCZEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264238 --- Comment #188 from J.R. Oldroyd --- Yes, the code has been there for ages. However, in 2.10 additional CONFIG_XYZ options are enabled which result in = the generation of an IE that wasn't being generated before. That IE is (correc= tly or incorrectly) being handed to our driver which is then incorrectly setting WPA as a result of the IE. Here is another proposed patch. I have taken the approach that, if the driver receives an IE, whether or no= t it should have received it, it should process the IE properly. At the moment = the driver just says "hey, we have an IE, so lets enable WPA". If the IE is the generated WLAN_EID_EXT_CAPAB IE, it is not the correct behavior to enable W= PA.=20 So in this proposed patch, I am checking to see if the IE is WLAN_EID_RSN o= r at least not WLAN_EID_EXT_CAPAB and only setting WPA in the appropriate case. diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c index c455bc93103..8ead569c2ff 100644 --- a/contrib/wpa/src/drivers/driver_bsd.c +++ b/contrib/wpa/src/drivers/driver_bsd.c @@ -1257,19 +1257,22 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params) if (wpa_driver_bsd_set_auth_alg(drv, params->auth_alg) < 0) ret =3D -1; /* XXX error handling is wrong but unclear what to do... */ - if (wpa_driver_bsd_set_wpa_ie(drv, params->wpa_ie, params->wpa_ie_l= en) < 0) + if (params->wpa_ie_len && params->wpa_ie[0] =3D=3D WLAN_EID_RSN && + wpa_driver_bsd_set_wpa_ie(drv, params->wpa_ie, params->wpa_ie_l= en) < 0) return -1; privacy =3D !(params->pairwise_suite =3D=3D WPA_CIPHER_NONE && params->group_suite =3D=3D WPA_CIPHER_NONE && params->key_mgmt_suite =3D=3D WPA_KEY_MGMT_NONE && - params->wpa_ie_len =3D=3D 0); + (params->wpa_ie_len =3D=3D 0 || params->wpa_ie[0] !=3D WLAN_EID= _RSN) + ); wpa_printf(MSG_DEBUG, "%s: set PRIVACY %u", __func__, privacy); if (set80211param(drv, IEEE80211_IOC_PRIVACY, privacy) < 0) return -1; if (params->wpa_ie_len && + params->wpa_ie[0] !=3D WLAN_EID_EXT_CAPAB && set80211param(drv, IEEE80211_IOC_WPA, params->wpa_ie[0] =3D=3D WLAN_EID_RSN ? 2 : 1) < = 0) return -1; --=20 You are receiving this mail because: You are on the CC list for the bug.=