From nobody Fri Sep 13 23:06:19 2024 X-Original-To: dev-commits-ports-all@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 4X590X0cY6z5WCsK; Fri, 13 Sep 2024 23:06:20 +0000 (UTC) (envelope-from git@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X590X04X9z4YG1; Fri, 13 Sep 2024 23:06:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726268780; 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; bh=NcTnjPECPSL9CN2fuLIKcn6PSbCQfotYxUSviSEnbcw=; b=CcNkCCmaENSqbKl6YenI63MaVnu7APfsk/vlNtwmGdk6xjIM+wapFwEX3LyXU0Bql7Cbit wchGDH8xa3mak5BsY7OVzv+cGGU5kcC+4Jb3/7SPwkPLa4cw3zNVRkssiHkYLGYkRd6m+E rGLqvWJU5nM6QwYnUd2uCoWzIUCmJ0P31Qw6rzWPQwwRw/6HU/s+I+HZ6k19HcpdA/VQjE bJGekLCiwyriHJq6K4Kpz+KG5Mru7pQECebcMBg6CmJ00sSsu5yCxzpUxog3XSr+VNsCS/ DxXFxvS4uC9MTqOF7zDVFpwH3WWJEgXDgMEEtmdxms+YhBQX384xkqwxzUJT+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726268780; a=rsa-sha256; cv=none; b=RQu3diQrvNYGbV6b3WiSCXkNyEDfPu+zO3ybZ+QQlPTFrquQkrOrWH6xtN113U1ljw7DX3 oxpBhzht8fi6ETD6yfsa5rlZIy2asVk0RvnLVSTBmkpFfhHsuvbTO6OsYfDvKB0TQyY63U zSscGPFVLAlhYrySH4waPGU/o2vqt13bi1hCdPM3dwMl0YmpBySgiyoNFDeNw7YX9Qijxu DV6vxQnZ0czKC9sqaXmO4ZrqDJwlpnALLhOdM9gNTywOZdAxsKr0dvi13oM70ZVhtReXeq 0qL/UzvyNorA9pU5Cr6XKej8eZf1v2Cg3LHw421VNOiXSFjwCAj5owgpHIXYIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726268780; 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; bh=NcTnjPECPSL9CN2fuLIKcn6PSbCQfotYxUSviSEnbcw=; b=dEYDS1mwvYziN07bP9o4+aKwzMLgs3pi/8yWudnH2yYx+l10RX4G9rqZBaY+5ieIvPNy6X iiN1GOSVEMaCB1Vi7tVT3pixeiXULu7o8hr7ucx+uK1Tl/HxcKY3/CkvdEnUEDkAy5/7Kc 6KS0EsCe0kiKwB7JUtCmY5fexWxhXzaKFx3v5Es0U7fPqGyY3Pbqq+ZXStGXEn1g9pQiIg 1tamlAWwPPlr+pghXxk1onmFwWNz7B7FOIm4S27KwFnl+OOf08AnIW13CBgztXcERnz9f3 7ZATEFoVwu4mtGCkKD66ehYbSTu8AfDjYOyDuLEX4T1KAZoZqNwchylx8b5yiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4X590W6Xp4z12wF; Fri, 13 Sep 2024 23:06:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48DN6J0i068095; Fri, 13 Sep 2024 23:06:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48DN6JFT068092; Fri, 13 Sep 2024 23:06:19 GMT (envelope-from git) Date: Fri, 13 Sep 2024 23:06:19 GMT Message-Id: <202409132306.48DN6JFT068092@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Cy Schubert Subject: git: ae5e86a50b3f - main - security/wpa_supplicant: Remove empty patch file List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae5e86a50b3f22515a8f47689bf91bb6face010e Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=ae5e86a50b3f22515a8f47689bf91bb6face010e commit ae5e86a50b3f22515a8f47689bf91bb6face010e Author: Cy Schubert AuthorDate: 2024-09-13 22:24:48 +0000 Commit: Cy Schubert CommitDate: 2024-09-13 22:44:39 +0000 security/wpa_supplicant: Remove empty patch file --- .../files/patch-src_drivers_driver__bsd.c | 281 --------------------- 1 file changed, 281 deletions(-) diff --git a/security/wpa_supplicant/files/patch-src_drivers_driver__bsd.c b/security/wpa_supplicant/files/patch-src_drivers_driver__bsd.c deleted file mode 100644 index dd72e1710cbd..000000000000 --- a/security/wpa_supplicant/files/patch-src_drivers_driver__bsd.c +++ /dev/null @@ -1,281 +0,0 @@ ---- src/drivers/driver_bsd.c.orig 2022-01-16 12:51:29.000000000 -0800 -+++ src/drivers/driver_bsd.c 2023-09-10 23:07:12.329586000 -0700 -@@ -14,6 +14,7 @@ - #include "driver.h" - #include "eloop.h" - #include "common/ieee802_11_defs.h" -+#include "common/ieee802_11_common.h" - #include "common/wpa_common.h" - - #include -@@ -293,8 +294,9 @@ - } - - static int --bsd_get_iface_flags(struct bsd_driver_data *drv) -+bsd_ctrl_iface(void *priv, int enable) - { -+ struct bsd_driver_data *drv = priv; - struct ifreq ifr; - - os_memset(&ifr, 0, sizeof(ifr)); -@@ -306,7 +308,34 @@ - return -1; - } - drv->flags = ifr.ifr_flags; -+ -+ -+ if (enable) { -+ if (ifr.ifr_flags & IFF_UP) -+ goto nochange; -+ ifr.ifr_flags |= IFF_UP; -+ } else { -+ if (!(ifr.ifr_flags & IFF_UP)) -+ goto nochange; -+ ifr.ifr_flags &= ~IFF_UP; -+ } -+ -+ if (ioctl(drv->global->sock, SIOCSIFFLAGS, &ifr) < 0) { -+ wpa_printf(MSG_ERROR, "ioctl[SIOCSIFFLAGS]: %s", -+ strerror(errno)); -+ return -1; -+ } -+ -+ wpa_printf(MSG_DEBUG, "%s: if %s (changed) enable %d IFF_UP %d ", -+ __func__, drv->ifname, enable, ((ifr.ifr_flags & IFF_UP) != 0)); -+ -+ drv->flags = ifr.ifr_flags; - return 0; -+ -+nochange: -+ wpa_printf(MSG_DEBUG, "%s: if %s (no change) enable %d IFF_UP %d ", -+ __func__, drv->ifname, enable, ((ifr.ifr_flags & IFF_UP) != 0)); -+ return 0; - } - - static int -@@ -525,7 +554,7 @@ - __func__); - return -1; - } -- return 0; -+ return bsd_ctrl_iface(priv, 1); - } - - static void -@@ -853,14 +882,18 @@ - drv = bsd_get_drvindex(global, ifm->ifm_index); - if (drv == NULL) - return; -- if ((ifm->ifm_flags & IFF_UP) == 0 && -- (drv->flags & IFF_UP) != 0) { -+ if (((ifm->ifm_flags & IFF_UP) == 0 || -+ (ifm->ifm_flags & IFF_RUNNING) == 0) && -+ (drv->flags & IFF_UP) != 0 && -+ (drv->flags & IFF_RUNNING) != 0) { - wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' DOWN", - drv->ifname); - wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_DISABLED, - NULL); - } else if ((ifm->ifm_flags & IFF_UP) != 0 && -- (drv->flags & IFF_UP) == 0) { -+ (ifm->ifm_flags & IFF_RUNNING) != 0 && -+ ((drv->flags & IFF_UP) == 0 || -+ (drv->flags & IFF_RUNNING) == 0)) { - wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP", - drv->ifname); - wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_ENABLED, -@@ -1025,7 +1058,8 @@ - if (l2_packet_get_own_addr(drv->sock_xmit, params->own_addr)) - goto bad; - -- if (bsd_get_iface_flags(drv) < 0) -+ /* mark down during setup */ -+ if (bsd_ctrl_iface(drv, 0) < 0) - goto bad; - - if (bsd_set_mediaopt(drv, IFM_OMASK, IFM_IEEE80211_HOSTAP) < 0) { -@@ -1050,12 +1084,13 @@ - { - struct bsd_driver_data *drv = priv; - -+ if (drv->ifindex != 0) -+ bsd_ctrl_iface(drv, 0); - if (drv->sock_xmit != NULL) - l2_packet_deinit(drv->sock_xmit); - os_free(drv); - } - -- - static int - bsd_set_sta_authorized(void *priv, const u8 *addr, - unsigned int total_flags, unsigned int flags_or, -@@ -1197,13 +1232,41 @@ - } - - static int -+wpa_driver_bsd_set_rsn_wpa_ie(struct bsd_driver_data * drv, -+ struct wpa_driver_associate_params *params, const u8 *ie) -+{ -+ int privacy; -+ size_t ie_len = ie[1] ? ie[1] + 2 : 0; -+ -+ /* XXX error handling is wrong but unclear what to do... */ -+ if (wpa_driver_bsd_set_wpa_ie(drv, ie, ie_len) < 0) -+ return -1; -+ -+ privacy = !(params->pairwise_suite == WPA_CIPHER_NONE && -+ params->group_suite == WPA_CIPHER_NONE && -+ params->key_mgmt_suite == WPA_KEY_MGMT_NONE); -+ wpa_printf(MSG_DEBUG, "%s: set PRIVACY %u", __func__, -+ privacy); -+ -+ if (set80211param(drv, IEEE80211_IOC_PRIVACY, privacy) < 0) -+ return -1; -+ -+ if (ie_len && -+ set80211param(drv, IEEE80211_IOC_WPA, -+ ie[0] == WLAN_EID_RSN ? 2 : 1) < 0) -+ return -1; -+ -+ return 0; -+} -+ -+static int - wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params) - { - struct bsd_driver_data *drv = priv; - struct ieee80211req_mlme mlme; - u32 mode; -- int privacy; - int ret = 0; -+ const u8 *wpa_ie, *rsn_ie; - - wpa_printf(MSG_DEBUG, - "%s: ssid '%.*s' wpa ie len %u pairwise %u group %u key mgmt %u" -@@ -1220,7 +1283,10 @@ - mode = 0 /* STA */; - break; - case IEEE80211_MODE_IBSS: -+#if 0 - mode = IFM_IEEE80211_IBSS; -+#endif -+ mode = IFM_IEEE80211_ADHOC; - break; - case IEEE80211_MODE_AP: - mode = IFM_IEEE80211_HOSTAP; -@@ -1249,24 +1315,33 @@ - ret = -1; - if (wpa_driver_bsd_set_auth_alg(drv, params->auth_alg) < 0) - ret = -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_len) < 0) -- return -1; - -- privacy = !(params->pairwise_suite == WPA_CIPHER_NONE && -- params->group_suite == WPA_CIPHER_NONE && -- params->key_mgmt_suite == WPA_KEY_MGMT_NONE && -- params->wpa_ie_len == 0); -- wpa_printf(MSG_DEBUG, "%s: set PRIVACY %u", __func__, privacy); -+ if (params->wpa_ie_len) { -+ rsn_ie = get_ie(params->wpa_ie, params->wpa_ie_len, -+ WLAN_EID_RSN); -+ if (rsn_ie) { -+ if (wpa_driver_bsd_set_rsn_wpa_ie(drv, params, -+ rsn_ie) < 0) -+ return -1; -+ } -+ else { -+ wpa_ie = get_vendor_ie(params->wpa_ie, -+ params->wpa_ie_len, WPA_IE_VENDOR_TYPE); -+ if (wpa_ie) { -+ if (wpa_driver_bsd_set_rsn_wpa_ie(drv, params, -+ wpa_ie) < 0) -+ return -1; -+ } -+ } -+ } - -- if (set80211param(drv, IEEE80211_IOC_PRIVACY, privacy) < 0) -+ /* -+ * NB: interface must be marked UP for association -+ * or scanning (ap_scan=2) -+ */ -+ if (bsd_ctrl_iface(drv, 1) < 0) - return -1; - -- if (params->wpa_ie_len && -- set80211param(drv, IEEE80211_IOC_WPA, -- params->wpa_ie[0] == WLAN_EID_RSN ? 2 : 1) < 0) -- return -1; -- - os_memset(&mlme, 0, sizeof(mlme)); - mlme.im_op = IEEE80211_MLME_ASSOC; - if (params->ssid != NULL) -@@ -1309,11 +1384,8 @@ - } - - /* NB: interface must be marked UP to do a scan */ -- if (!(drv->flags & IFF_UP)) { -- wpa_printf(MSG_DEBUG, "%s: interface is not up, cannot scan", -- __func__); -+ if (bsd_ctrl_iface(drv, 1) < 0) - return -1; -- } - - #ifdef IEEE80211_IOC_SCAN_MAX_SSID - os_memset(&sr, 0, sizeof(sr)); -@@ -1485,6 +1557,17 @@ - if (devcaps.dc_drivercaps & IEEE80211_C_WPA2) - drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA2 | - WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK; -+#ifdef __FreeBSD__ -+ drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | -+ WPA_DRIVER_CAPA_ENC_WEP104 | -+ WPA_DRIVER_CAPA_ENC_TKIP | -+ WPA_DRIVER_CAPA_ENC_CCMP; -+#else -+ /* -+ * XXX -+ * FreeBSD exports hardware cryptocaps. These have no meaning for wpa -+ * since net80211 performs software crypto. -+ */ - - if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_WEP) - drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | -@@ -1493,6 +1576,7 @@ - drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP; - if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_CCM) - drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP; -+#endif - - if (devcaps.dc_drivercaps & IEEE80211_C_HOSTAP) - drv->capa.flags |= WPA_DRIVER_FLAGS_AP; -@@ -1545,6 +1629,8 @@ - } - if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) - return IEEE80211_M_HOSTAP; -+ if (ifmr.ifm_current & IFM_IEEE80211_IBSS) -+ return IEEE80211_M_IBSS; - if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) - return IEEE80211_M_MONITOR; - #ifdef IEEE80211_M_MBSS -@@ -1605,7 +1691,7 @@ - drv->capa.key_mgmt_iftype[i] = drv->capa.key_mgmt; - - /* Down interface during setup. */ -- if (bsd_get_iface_flags(drv) < 0) -+ if (bsd_ctrl_iface(drv, 0) < 0) - goto fail; - - /* Proven to work, lets go! */ -@@ -1628,6 +1714,9 @@ - - if (drv->ifindex != 0 && !drv->if_removed) { - wpa_driver_bsd_set_wpa(drv, 0); -+ -+ /* NB: mark interface down */ -+ bsd_ctrl_iface(drv, 0); - - wpa_driver_bsd_set_wpa_internal(drv, drv->prev_wpa, - drv->prev_privacy);