Blame SOURCES/0001-D-Bus-Add-wep_disabled-capability.patch

e0eb43
From 5b093570dca1855c5bf40bcbd8d149fa6f8ea8ff Mon Sep 17 00:00:00 2001
e0eb43
Message-Id: <5b093570dca1855c5bf40bcbd8d149fa6f8ea8ff.1650620058.git.davide.caratti@gmail.com>
e0eb43
From: Lubomir Rintel <lkundrak@v3.sk>
e0eb43
Date: Mon, 7 Mar 2022 09:54:46 +0100
e0eb43
Subject: [PATCH] D-Bus: Add 'wep_disabled' capability
e0eb43
e0eb43
Since commit 200c7693c9a1 ('Make WEP functionality an optional build
e0eb43
parameter'), WEP support is optional and, indeed, off by default.
e0eb43
e0eb43
The distributions are now catching up and disabling WEP in their builds.
e0eb43
Unfortunately, there's no indication prior to an attempt to connect to a
e0eb43
WEP network that it's not going to work. Add a capability to communicate
e0eb43
that.
e0eb43
e0eb43
Unlike other capabilities, this one is negative. That is, it indicates
e0eb43
lack of a WEP support as opposed to its presence. This is necessary
e0eb43
because historically there has been no capability to indicate presence
e0eb43
of WEP support and therefore NetworkManager (and probably others) just
e0eb43
assumes it's there.
e0eb43
e0eb43
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
e0eb43
Acked-by: Davide Caratti <davide.caratti@gmail.com>
e0eb43
---
e0eb43
 wpa_supplicant/dbus/dbus_new_handlers.c | 5 ++++-
e0eb43
 1 file changed, 4 insertions(+), 1 deletion(-)
e0eb43
e0eb43
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
e0eb43
index 1c9ded09a..0b1002bf1 100644
e0eb43
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
e0eb43
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
e0eb43
@@ -1121,7 +1121,7 @@ dbus_bool_t wpas_dbus_getter_global_capabilities(
e0eb43
 	const struct wpa_dbus_property_desc *property_desc,
e0eb43
 	DBusMessageIter *iter, DBusError *error, void *user_data)
e0eb43
 {
e0eb43
-	const char *capabilities[13];
e0eb43
+	const char *capabilities[14];
e0eb43
 	size_t num_items = 0;
e0eb43
 	struct wpa_global *global = user_data;
e0eb43
 	struct wpa_supplicant *wpa_s;
e0eb43
@@ -1177,6 +1177,9 @@ dbus_bool_t wpas_dbus_getter_global_capabilities(
e0eb43
 #endif /* CONFIG_SUITEB192 */
e0eb43
 	if (ext_key_id_supported)
e0eb43
 		capabilities[num_items++] = "extended_key_id";
e0eb43
+#ifndef CONFIG_WEP
e0eb43
+	capabilities[num_items++] = "wep_disabled";
e0eb43
+#endif /* !CONFIG_WEP */
e0eb43
 
e0eb43
 	return wpas_dbus_simple_array_property_getter(iter,
e0eb43
 						      DBUS_TYPE_STRING,
e0eb43
-- 
e0eb43
2.35.1
e0eb43