All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iwd: Fix missing Ethernet attributes
@ 2021-10-01 12:13 VAUTRIN Emmanuel (Canal Plus Prestataire)
  2021-10-01 13:28 ` Michael Nazzareno Trimarchi
  2021-10-04  6:18 ` Daniel Wagner
  0 siblings, 2 replies; 6+ messages in thread
From: VAUTRIN Emmanuel (Canal Plus Prestataire) @ 2021-10-01 12:13 UTC (permalink / raw)
  To: connman

The Interface, Address and MTU attributes of Ethernet Service property
were not retrieved because the interface index was specified to late
(at network connection instead of creation), preventing the access
to the corresponding ipconfig.
---
 plugins/iwd.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/plugins/iwd.c b/plugins/iwd.c
index 14a442a7b67c..9f2114f47311 100644
--- a/plugins/iwd.c
+++ b/plugins/iwd.c
@@ -209,18 +209,13 @@ static int cm_network_probe(struct connman_network *network)
 static void update_network_connected(struct iwd_network *iwdn)
 {
 	struct iwd_device *iwdd;
-	int index;
 
 	iwdd = g_hash_table_lookup(devices, iwdn->device);
 	if (!iwdd)
 		return;
 
-	index = connman_inet_ifindex(iwdd->name);
-	if (index < 0)
-		return;
-
-	DBG("interface name %s index %d", iwdd->name, index);
-	connman_network_set_index(iwdn->network, index);
+	DBG("interface name %s index %d", iwdd->name,
+		connman_network_get_index(iwdn->network));
 	connman_network_set_connected(iwdn->network, true);
 }
 
@@ -912,6 +907,7 @@ static void add_network(const char *path, struct iwd_network *iwdn)
 {
 	struct iwd_device *iwdd;
 	char *identifier;
+	int index;
 
 	iwdd = g_hash_table_lookup(devices, iwdn->device);
 	if (!iwdd)
@@ -920,6 +916,11 @@ static void add_network(const char *path, struct iwd_network *iwdn)
 	identifier = create_identifier(path, iwdn->type);
 	iwdn->network = connman_network_create(identifier,
 					CONNMAN_NETWORK_TYPE_WIFI);
+
+	index = connman_inet_ifindex(iwdd->name);
+	if (index >= 0)
+		connman_network_set_index(iwdn->network, index);
+
 	connman_network_set_data(iwdn->network, iwdn);
 
 	connman_network_set_name(iwdn->network, iwdn->name);
-- 
2.25.1

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

* Re: [PATCH] iwd: Fix missing Ethernet attributes
  2021-10-01 12:13 [PATCH] iwd: Fix missing Ethernet attributes VAUTRIN Emmanuel (Canal Plus Prestataire)
@ 2021-10-01 13:28 ` Michael Nazzareno Trimarchi
  2021-10-01 13:48   ` VAUTRIN Emmanuel (Canal Plus Prestataire)
  2021-10-04  6:18 ` Daniel Wagner
  1 sibling, 1 reply; 6+ messages in thread
From: Michael Nazzareno Trimarchi @ 2021-10-01 13:28 UTC (permalink / raw)
  To: Emmanuel.VAUTRIN; +Cc: connman

Hi Emmanuel

On Fri, Oct 1, 2021 at 2:13 PM VAUTRIN Emmanuel (Canal Plus
Prestataire) <Emmanuel.VAUTRIN@cpexterne.org> wrote:
>
> The Interface, Address and MTU attributes of Ethernet Service property
> were not retrieved because the interface index was specified to late
> (at network connection instead of creation), preventing the access
> to the corresponding ipconfig.
> ---
>  plugins/iwd.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/plugins/iwd.c b/plugins/iwd.c
> index 14a442a7b67c..9f2114f47311 100644
> --- a/plugins/iwd.c
> +++ b/plugins/iwd.c
> @@ -209,18 +209,13 @@ static int cm_network_probe(struct connman_network *network)
>  static void update_network_connected(struct iwd_network *iwdn)
>  {
>         struct iwd_device *iwdd;
> -       int index;
>
>         iwdd = g_hash_table_lookup(devices, iwdn->device);
>         if (!iwdd)
>                 return;
>
> -       index = connman_inet_ifindex(iwdd->name);
> -       if (index < 0)
> -               return;
> -
> -       DBG("interface name %s index %d", iwdd->name, index);
> -       connman_network_set_index(iwdn->network, index);
> +       DBG("interface name %s index %d", iwdd->name,
> +               connman_network_get_index(iwdn->network));
>         connman_network_set_connected(iwdn->network, true);
>  }
>

I have sent a similar patch 6 minutes after you. Anyway nice we get
the same conclusion.

Tested-by: Michael Trimarchi <michael@amarulasolutions.com>

Michae
> @@ -912,6 +907,7 @@ static void add_network(const char *path, struct iwd_network *iwdn)
>  {
>         struct iwd_device *iwdd;
>         char *identifier;
> +       int index;
>
>         iwdd = g_hash_table_lookup(devices, iwdn->device);
>         if (!iwdd)
> @@ -920,6 +916,11 @@ static void add_network(const char *path, struct iwd_network *iwdn)
>         identifier = create_identifier(path, iwdn->type);
>         iwdn->network = connman_network_create(identifier,
>                                         CONNMAN_NETWORK_TYPE_WIFI);
> +
> +       index = connman_inet_ifindex(iwdd->name);
> +       if (index >= 0)
> +               connman_network_set_index(iwdn->network, index);
> +
>         connman_network_set_data(iwdn->network, iwdn);
>
>         connman_network_set_name(iwdn->network, iwdn->name);
> --
> 2.25.1
>


-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com

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

* RE: [PATCH] iwd: Fix missing Ethernet attributes
  2021-10-01 13:28 ` Michael Nazzareno Trimarchi
@ 2021-10-01 13:48   ` VAUTRIN Emmanuel (Canal Plus Prestataire)
  2021-10-01 13:51     ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 6+ messages in thread
From: VAUTRIN Emmanuel (Canal Plus Prestataire) @ 2021-10-01 13:48 UTC (permalink / raw)
  To: Michael Nazzareno Trimarchi; +Cc: connman

Hello Michael,

> I have sent a similar patch 6 minutes after you. Anyway nice we get
> the same conclusion.

Indeed, what I have noticed.

In fact, I have just integrated iwd in my projects (set-top-boxes),
which where previously based on wpa-supplicant.
When I ran my network test campaign, I have faced some issues I have fixed,
to keep the same behavior as previously, with wpa-supplicant.
Today, I am proposing  the corresponding patches.

Best Regards,

Emmanuel

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

* Re: [PATCH] iwd: Fix missing Ethernet attributes
  2021-10-01 13:48   ` VAUTRIN Emmanuel (Canal Plus Prestataire)
@ 2021-10-01 13:51     ` Michael Nazzareno Trimarchi
  2021-10-01 15:32       ` VAUTRIN Emmanuel (Canal Plus Prestataire)
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Nazzareno Trimarchi @ 2021-10-01 13:51 UTC (permalink / raw)
  To: VAUTRIN Emmanuel (Canal Plus Prestataire); +Cc: connman

Hi

On Fri, Oct 1, 2021 at 3:48 PM VAUTRIN Emmanuel (Canal Plus
Prestataire) <Emmanuel.VAUTRIN@cpexterne.org> wrote:
>
> Hello Michael,
>
> > I have sent a similar patch 6 minutes after you. Anyway nice we get
> > the same conclusion.
>
> Indeed, what I have noticed.
>
> In fact, I have just integrated iwd in my projects (set-top-boxes),
> which where previously based on wpa-supplicant.
> When I ran my network test campaign, I have faced some issues I have fixed,
> to keep the same behavior as previously, with wpa-supplicant.
> Today, I am proposing  the corresponding patches.
>

Doing the same, at the moment ;). For another project.

Michael

> Best Regards,
>
> Emmanuel



-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com

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

* RE: [PATCH] iwd: Fix missing Ethernet attributes
  2021-10-01 13:51     ` Michael Nazzareno Trimarchi
@ 2021-10-01 15:32       ` VAUTRIN Emmanuel (Canal Plus Prestataire)
  0 siblings, 0 replies; 6+ messages in thread
From: VAUTRIN Emmanuel (Canal Plus Prestataire) @ 2021-10-01 15:32 UTC (permalink / raw)
  To: Michael Nazzareno Trimarchi; +Cc: connman

> Doing the same, at the moment ;). For another project.
I have finished sending my patches, I hope it will help your integration.

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

* Re: [PATCH] iwd: Fix missing Ethernet attributes
  2021-10-01 12:13 [PATCH] iwd: Fix missing Ethernet attributes VAUTRIN Emmanuel (Canal Plus Prestataire)
  2021-10-01 13:28 ` Michael Nazzareno Trimarchi
@ 2021-10-04  6:18 ` Daniel Wagner
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Wagner @ 2021-10-04  6:18 UTC (permalink / raw)
  To: connman, VAUTRIN Emmanuel (Canal Plus Prestataire); +Cc: Daniel Wagner

On Fri, 1 Oct 2021 12:13:49 +0000, VAUTRIN Emmanuel (Canal Plus Prestataire) wrote:
> The Interface, Address and MTU attributes of Ethernet Service property
> were not retrieved because the interface index was specified to late
> (at network connection instead of creation), preventing the access
> to the corresponding ipconfig.
> 

Applied, thanks!

[1/1] iwd: Fix missing Ethernet attributes
      commit: dd7d4be53b9a6ca58cf8880d605fb5711ba5325b

Best regards,
-- 
Daniel Wagner <wagi@monom.org>

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

end of thread, other threads:[~2021-10-04  6:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 12:13 [PATCH] iwd: Fix missing Ethernet attributes VAUTRIN Emmanuel (Canal Plus Prestataire)
2021-10-01 13:28 ` Michael Nazzareno Trimarchi
2021-10-01 13:48   ` VAUTRIN Emmanuel (Canal Plus Prestataire)
2021-10-01 13:51     ` Michael Nazzareno Trimarchi
2021-10-01 15:32       ` VAUTRIN Emmanuel (Canal Plus Prestataire)
2021-10-04  6:18 ` Daniel Wagner

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.