All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] client: Show WEP networks as unsupported
@ 2021-04-30 17:42 Sean Anderson
  2021-04-30 18:12 ` Denis Kenzior
  2021-05-01  2:32 ` Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Sean Anderson @ 2021-04-30 17:42 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1835 bytes --]

WEP networks are not supported by iwd. However, the only indication is the
message "Operation not supported" while trying to connect. It is not clear
enough that this is due to intentional lack of support (as opposed to some
kind of misconfiguration). This patch explicitly lists WEP networks shown
with get-networks as unsupported. Hopefully this will make it clearer for
those of us not as familiar with iwd.

CC: James Prestwood <prestwoj@gmail.com>
CC: Marcel Holtmann <marcel@holtmann.org>
CC: Denis Kenzior <denkenz@gmail.com>
---
 client/station.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/client/station.c b/client/station.c
index de25d12b..425b10a1 100644
--- a/client/station.c
+++ b/client/station.c
@@ -352,7 +352,7 @@ static void ordered_networks_display(struct l_queue *ordered_networks)
 
 	display_table_header("Available networks", "%s%-*s%-*s%-*s%*s",
 					MARGIN, 2, "", 32, "Network name",
-					10, "Security", 6, "Signal");
+					18, "Security", 6, "Signal");
 
 	if (!l_queue_length(ordered_networks)) {
 		display("No networks available\n");
@@ -369,13 +369,16 @@ static void ordered_networks_display(struct l_queue *ordered_networks)
 		const char *network_name = network_get_name(network_i);
 		const char *network_type = network_get_type(network_i);
 
+		if (!strcmp(network_type, "wep"))
+			network_type = "wep (unsupported)";
+
 		if (display_signal_as_dbms)
 			dbms = l_strdup_printf("%d", network->signal_strength);
 
 		display("%s%-*s%-*s%-*s%-*s\n", MARGIN, 2,
 			network_is_connected(network_i) ?
 				COLOR_BOLDGRAY "> " COLOR_OFF : "",
-			32, network_name, 10, network_type,
+			32, network_name, 18, network_type,
 			6, display_signal_as_dbms ? dbms :
 				dbms_tostars(network->signal_strength));
 
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] client: Show WEP networks as unsupported
  2021-04-30 17:42 [PATCH] client: Show WEP networks as unsupported Sean Anderson
@ 2021-04-30 18:12 ` Denis Kenzior
  2021-05-01  2:32 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Denis Kenzior @ 2021-04-30 18:12 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

Hi Sean,

On 4/30/21 12:42 PM, Sean Anderson wrote:
> WEP networks are not supported by iwd. However, the only indication is the
> message "Operation not supported" while trying to connect. It is not clear
> enough that this is due to intentional lack of support (as opposed to some
> kind of misconfiguration). This patch explicitly lists WEP networks shown
> with get-networks as unsupported. Hopefully this will make it clearer for
> those of us not as familiar with iwd.
> 
> CC: James Prestwood <prestwoj@gmail.com>
> CC: Marcel Holtmann <marcel@holtmann.org>
> CC: Denis Kenzior <denkenz@gmail.com>
> ---
>   client/station.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 

This is a nice improvement.  Applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] client: Show WEP networks as unsupported
  2021-04-30 17:42 [PATCH] client: Show WEP networks as unsupported Sean Anderson
  2021-04-30 18:12 ` Denis Kenzior
@ 2021-05-01  2:32 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2021-05-01  2:32 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]

Hi Denis,

> WEP networks are not supported by iwd. However, the only indication is the
> message "Operation not supported" while trying to connect. It is not clear
> enough that this is due to intentional lack of support (as opposed to some
> kind of misconfiguration). This patch explicitly lists WEP networks shown
> with get-networks as unsupported. Hopefully this will make it clearer for
> those of us not as familiar with iwd.
> 
> CC: James Prestwood <prestwoj@gmail.com>
> CC: Marcel Holtmann <marcel@holtmann.org>
> CC: Denis Kenzior <denkenz@gmail.com>
> ---
> client/station.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/client/station.c b/client/station.c
> index de25d12b..425b10a1 100644
> --- a/client/station.c
> +++ b/client/station.c
> @@ -352,7 +352,7 @@ static void ordered_networks_display(struct l_queue *ordered_networks)
> 
> 	display_table_header("Available networks", "%s%-*s%-*s%-*s%*s",
> 					MARGIN, 2, "", 32, "Network name",
> -					10, "Security", 6, "Signal");
> +					18, "Security", 6, "Signal");
> 
> 	if (!l_queue_length(ordered_networks)) {
> 		display("No networks available\n");
> @@ -369,13 +369,16 @@ static void ordered_networks_display(struct l_queue *ordered_networks)
> 		const char *network_name = network_get_name(network_i);
> 		const char *network_type = network_get_type(network_i);
> 
> +		if (!strcmp(network_type, "wep"))
> +			network_type = "wep (unsupported)";
> +

this is kinda neat, but I wonder if iwd itself should just stop reporting WEP networks. It is actually a bad idea to report something that we can never (and never will) connect to.

Unless of course we show them as “open” and break the WEP key on the fly ;)

Regards

Marcel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-01  2:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 17:42 [PATCH] client: Show WEP networks as unsupported Sean Anderson
2021-04-30 18:12 ` Denis Kenzior
2021-05-01  2:32 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.