From patchwork Mon Mar 7 08:54:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 1601958 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=jx9DiLgv; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KBslx3kLDz9sFr for ; Mon, 7 Mar 2022 19:57:17 +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: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:In-Reply-To:References: List-Owner; bh=tI5EvCL1nvbMd88zWshVpfCBWqQLp8mTzSU3GJFeFa4=; b=jx9DiLgvetb0/e rADlI8mJ83LsRbxO8yql3QBnsJ13JrS9TOYw4DIc72zFLEINrCCdD5kLyKR4+NLkLY698Vsn2U1Mh hQflYfGWkJ7E3ZkZXTnv4iy6+PRFnCSPVyYEm8dzBn+K+AbLwbmycMWTRf1f4oUF9bAslq0EbZyum ZNvmuxNsBqx4VBbtMop/y6JWVADqX6AaSqZjzG3omWZktHn78FiZEe21oiuR/60L8ejzgGrs5d2I8 WCHgNM60aRWiFaLSbmObmTGMkPBBmBRhUbK6Z9wiMrr1PiEjFxZOgvkrerL1ADRRU+bpRrzBX59h+ PfFfnaOE8qNehthuU4DA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nR99b-00GaZm-0O; Mon, 07 Mar 2022 08:55:43 +0000 Received: from us-smtp-delivery-44.mimecast.com ([205.139.111.44]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nR99X-00GaUw-Mi for hostap@lists.infradead.org; Mon, 07 Mar 2022 08:55:41 +0000 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-618-D1IUrqrkMHqwpVLO79ZyOA-1; Mon, 07 Mar 2022 03:55:30 -0500 X-MC-Unique: D1IUrqrkMHqwpVLO79ZyOA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9B7A0520E; Mon, 7 Mar 2022 08:55:29 +0000 (UTC) Received: from bzdocha.local (unknown [10.43.2.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9D1AD7AB4C; Mon, 7 Mar 2022 08:55:28 +0000 (UTC) From: Lubomir Rintel To: hostap@lists.infradead.org Cc: Davide Caratti , Lubomir Rintel Subject: [PATCH] D-Bus: Add 'wep_disabled' capability Date: Mon, 7 Mar 2022 09:54:46 +0100 Message-Id: <20220307085446.706024-1-lkundrak@v3.sk> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lkundrak@v3.sk X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: v3.sk X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220307_005539_914410_2C2029E4 X-CRM114-Status: GOOD ( 14.26 ) 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: Since commit 200c7693c9a1 ('Make WEP functionality an optional build parameter'), WEP support is optional and, indeed, off by default. The distributions are now catching up and disabling WEP in their builds. Unfortunately, there's no indication prior to an attempt to connect to a WEP network that it's not going to work. Add a capabil [...] Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [205.139.111.44 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=lkundrak%40v3.sk; ip=205.139.111.44; r=bombadil.infradead.org] 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 Since commit 200c7693c9a1 ('Make WEP functionality an optional build parameter'), WEP support is optional and, indeed, off by default. The distributions are now catching up and disabling WEP in their builds. Unfortunately, there's no indication prior to an attempt to connect to a WEP network that it's not going to work. Add a capability to communicate that. Unlike other capabilities, this one is negative. That is, it indicates lack of a WEP support as opposed to its presence. This is necessary because historically there has been no capability to indicate presence of WEP support and therefore NetworkManager (and probably others) just assumes it's there. Signed-off-by: Lubomir Rintel Acked-by: Davide Caratti --- wpa_supplicant/dbus/dbus_new_handlers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c index 959a68b4c..67c06d407 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.c +++ b/wpa_supplicant/dbus/dbus_new_handlers.c @@ -1121,7 +1121,7 @@ dbus_bool_t wpas_dbus_getter_global_capabilities( const struct wpa_dbus_property_desc *property_desc, DBusMessageIter *iter, DBusError *error, void *user_data) { - const char *capabilities[13]; + const char *capabilities[14]; size_t num_items = 0; struct wpa_global *global = user_data; struct wpa_supplicant *wpa_s; @@ -1177,6 +1177,9 @@ dbus_bool_t wpas_dbus_getter_global_capabilities( #endif /* CONFIG_SUITEB192 */ if (ext_key_id_supported) capabilities[num_items++] = "extended_key_id"; +#ifndef CONFIG_WEP + capabilities[num_items++] = "wep_disabled"; +#endif /* !CONFIG_WEP */ return wpas_dbus_simple_array_property_getter(iter, DBUS_TYPE_STRING,