diff mbox series

D-Bus: Add 'wep_disabled' capability

Message ID 20220307085446.706024-1-lkundrak@v3.sk
State Accepted
Headers show
Series D-Bus: Add 'wep_disabled' capability | expand

Commit Message

Lubomir Rintel March 7, 2022, 8:54 a.m. UTC
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 <lkundrak@v3.sk>
---
 wpa_supplicant/dbus/dbus_new_handlers.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

d. caratti March 8, 2022, 1:37 p.m. UTC | #1
Il giorno lun 7 mar 2022 alle ore 09:55 Lubomir Rintel
<lkundrak@v3.sk> ha scritto:
>
> 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 <lkundrak@v3.sk>

Looks good to me, thanks!

Acked-by: Davide Caratti <davide.caratti@gmail.com>
Jouni Malinen March 12, 2022, 5:04 p.m. UTC | #2
On Mon, Mar 07, 2022 at 09:54:46AM +0100, Lubomir Rintel wrote:
> 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.

Thanks, applied.
diff mbox series

Patch

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,