* [PATCH] gateway: fix calculation of is_vpn6
@ 2025-01-23 11:38 Gabriel Sanches
2025-01-24 13:20 ` daniel antoine
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Gabriel Sanches @ 2025-01-23 11:38 UTC (permalink / raw)
To: connman@lists.linux.dev
Fix is_vpn6 to use ipv6 variables not ipv4 variables. This stops
the WireGuard plugin from faulting on startup.
Fixes: commit 823d5a2a8cc4 ("connection: Refactor ‘__connman_connection_gateway_add’”)”
Signed-of-by: Gabriel Sanches <gabriel.sanches@prevas.dk>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
---
src/gateway.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gateway.c b/src/gateway.c
index 16c87f83..b2c211e2 100644
--- a/src/gateway.c
+++ b/src/gateway.c
@@ -3704,10 +3704,10 @@ int __connman_gateway_add(struct connman_service *service,
is_gateway_config_vpn(
new_gateway->ipv4_config);
- is_vpn6 = do_ipv4 &&
- new_gateway->ipv4_config &&
+ is_vpn6 = do_ipv6 &&
+ new_gateway->ipv6_config &&
is_gateway_config_vpn(
- new_gateway->ipv4_config);
+ new_gateway->ipv6_config);
} else {
if (do_ipv4 && new_gateway->ipv4_config)
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] gateway: fix calculation of is_vpn6
2025-01-23 11:38 [PATCH] gateway: fix calculation of is_vpn6 Gabriel Sanches
@ 2025-01-24 13:20 ` daniel antoine
2025-02-14 6:33 ` Christian Hewitt
2025-02-14 16:02 ` Denis Kenzior
2 siblings, 0 replies; 6+ messages in thread
From: daniel antoine @ 2025-01-24 13:20 UTC (permalink / raw)
To: Gabriel Sanches; +Cc: connman@lists.linux.dev
Hi
I have installed the patch but I am not sure about the config file in
/usr/lib/connman-vpn
does it look like this
[provider_wireguard]
Type = WireGuard
Name = Wireguard VPN Tunnel
Host = 3.2.5.6
Domain = my.home.network
WireGuard.Address = 10.2.0.2/24
WireGuard.ListenPort = 47824
WireGuard.DNS = 10.2.0.1
WireGuard.PrivateKey = qKIj010hDdWSjQQyVCnEgthLXusBgm3I6HWrJUaJymc=
WireGuard.PublicKey = zzqUfWGIil6QxrAGz77HE5BGUEdD2PgHYnCg3CDKagE=
WireGuard.AllowedIPs = 0.0.0.0/0, ::/0
WireGuard.EndpointPort = 51820
I am not sure if the options Domain WireGuard.DNS and
WireGuard.ListenPort are mandatory. The host must be an Ip address or
a name like mysite.fr ?
Best regards
Daniel
Le jeu. 23 janv. 2025 à 12:38, Gabriel Sanches
<gabriel.sanches@prevas.dk> a écrit :
>
> Fix is_vpn6 to use ipv6 variables not ipv4 variables. This stops
> the WireGuard plugin from faulting on startup.
>
> Fixes: commit 823d5a2a8cc4 ("connection: Refactor ‘__connman_connection_gateway_add’”)”
>
> Signed-of-by: Gabriel Sanches <gabriel.sanches@prevas.dk>
> Tested-by: Christian Hewitt <christianshewitt@gmail.com>
>
> ---
> src/gateway.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/gateway.c b/src/gateway.c
> index 16c87f83..b2c211e2 100644
> --- a/src/gateway.c
> +++ b/src/gateway.c
> @@ -3704,10 +3704,10 @@ int __connman_gateway_add(struct connman_service *service,
> is_gateway_config_vpn(
> new_gateway->ipv4_config);
>
> - is_vpn6 = do_ipv4 &&
> - new_gateway->ipv4_config &&
> + is_vpn6 = do_ipv6 &&
> + new_gateway->ipv6_config &&
> is_gateway_config_vpn(
> - new_gateway->ipv4_config);
> + new_gateway->ipv6_config);
>
> } else {
> if (do_ipv4 && new_gateway->ipv4_config)
> --
> 2.43.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gateway: fix calculation of is_vpn6
2025-01-23 11:38 [PATCH] gateway: fix calculation of is_vpn6 Gabriel Sanches
2025-01-24 13:20 ` daniel antoine
@ 2025-02-14 6:33 ` Christian Hewitt
2025-02-14 16:02 ` Denis Kenzior
2 siblings, 0 replies; 6+ messages in thread
From: Christian Hewitt @ 2025-02-14 6:33 UTC (permalink / raw)
To: Gabriel Sanches; +Cc: connman@lists.linux.dev
> On 23 Jan 2025, at 3:38 pm, Gabriel Sanches <gabriel.sanches@prevas.dk> wrote:
>
> Fix is_vpn6 to use ipv6 variables not ipv4 variables. This stops
> the WireGuard plugin from faulting on startup.
>
> Fixes: commit 823d5a2a8cc4 ("connection: Refactor ‘__connman_connection_gateway_add’”)”
>
> Signed-of-by: Gabriel Sanches <gabriel.sanches@prevas.dk>
> Tested-by: Christian Hewitt <christianshewitt@gmail.com>
>
> ---
> src/gateway.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/gateway.c b/src/gateway.c
> index 16c87f83..b2c211e2 100644
> --- a/src/gateway.c
> +++ b/src/gateway.c
> @@ -3704,10 +3704,10 @@ int __connman_gateway_add(struct connman_service *service,
> is_gateway_config_vpn(
> new_gateway->ipv4_config);
>
> - is_vpn6 = do_ipv4 &&
> - new_gateway->ipv4_config &&
> + is_vpn6 = do_ipv6 &&
> + new_gateway->ipv6_config &&
> is_gateway_config_vpn(
> - new_gateway->ipv4_config);
> + new_gateway->ipv6_config);
>
> } else {
> if (do_ipv4 && new_gateway->ipv4_config)
> --
> 2.43.0
This fixes a complete breakage of the ConnMan plugin:
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gateway: fix calculation of is_vpn6
2025-01-23 11:38 [PATCH] gateway: fix calculation of is_vpn6 Gabriel Sanches
2025-01-24 13:20 ` daniel antoine
2025-02-14 6:33 ` Christian Hewitt
@ 2025-02-14 16:02 ` Denis Kenzior
2025-02-21 16:15 ` Grant Erickson
2 siblings, 1 reply; 6+ messages in thread
From: Denis Kenzior @ 2025-02-14 16:02 UTC (permalink / raw)
To: Gabriel Sanches, connman@lists.linux.dev
Hi,
On 1/23/25 5:38 AM, Gabriel Sanches wrote:
> Fix is_vpn6 to use ipv6 variables not ipv4 variables. This stops
> the WireGuard plugin from faulting on startup.
>
> Fixes: commit 823d5a2a8cc4 ("connection: Refactor ‘__connman_connection_gateway_add’”)”
>
> Signed-of-by: Gabriel Sanches <gabriel.sanches@prevas.dk>
> Tested-by: Christian Hewitt <christianshewitt@gmail.com>
>
> ---
> src/gateway.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
This patch does not apply cleanly to upstream. Anyone care to re-send?
Regards,
-Denis
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gateway: fix calculation of is_vpn6
2025-02-14 16:02 ` Denis Kenzior
@ 2025-02-21 16:15 ` Grant Erickson
2025-02-21 17:13 ` Grant Erickson
0 siblings, 1 reply; 6+ messages in thread
From: Grant Erickson @ 2025-02-21 16:15 UTC (permalink / raw)
To: Denis Kenzior; +Cc: Gabriel Sanches, connman@lists.linux.dev, Christian Hewitt
On Feb 14, 2025, at 8:02 AM, Denis Kenzior <denkenz@gmail.com> wrote:
> On 1/23/25 5:38 AM, Gabriel Sanches wrote:
>> Fix is_vpn6 to use ipv6 variables not ipv4 variables. This stops
>> the WireGuard plugin from faulting on startup.
>> Fixes: commit 823d5a2a8cc4 ("connection: Refactor ‘__connman_connection_gateway_add’”)”
>> Signed-of-by: Gabriel Sanches <gabriel.sanches@prevas.dk>
>> Tested-by: Christian Hewitt <christianshewitt@gmail.com>
>> ---
>> src/gateway.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> This patch does not apply cleanly to upstream. Anyone care to re-send?
Denis,
On it; stand by.
Best,
Grant
--
Principal
Nuovations
gerickson@nuovations.com
https://www.nuovations.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gateway: fix calculation of is_vpn6
2025-02-21 16:15 ` Grant Erickson
@ 2025-02-21 17:13 ` Grant Erickson
0 siblings, 0 replies; 6+ messages in thread
From: Grant Erickson @ 2025-02-21 17:13 UTC (permalink / raw)
To: Denis Kenzior; +Cc: Gabriel Sanches, connman@lists.linux.dev, Christian Hewitt
On Feb 21, 2025, at 8:15 AM, Grant Erickson <gerickson@nuovations.com> wrote:
> On Feb 14, 2025, at 8:02 AM, Denis Kenzior <denkenz@gmail.com> wrote:
>> On 1/23/25 5:38 AM, Gabriel Sanches wrote:
>>> Fix is_vpn6 to use ipv6 variables not ipv4 variables. This stops
>>> the WireGuard plugin from faulting on startup.
>>> Fixes: commit 823d5a2a8cc4 ("connection: Refactor ‘__connman_connection_gateway_add’”)”
>>> Signed-of-by: Gabriel Sanches <gabriel.sanches@prevas.dk>
>>> Tested-by: Christian Hewitt <christianshewitt@gmail.com>
>>> ---
>>> src/gateway.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> This patch does not apply cleanly to upstream. Anyone care to re-send?
>
> Denis,
>
> On it; stand by.
Resubmitted:
https://lore.kernel.org/connman/5e1a105eda4ae36e7a9132140949c569cd02fe02.1740157858.git.gerickson@nuovations.com/T/#u
Best,
Grant
--
Principal
Nuovations
gerickson@nuovations.com
https://www.nuovations.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-02-21 17:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-23 11:38 [PATCH] gateway: fix calculation of is_vpn6 Gabriel Sanches
2025-01-24 13:20 ` daniel antoine
2025-02-14 6:33 ` Christian Hewitt
2025-02-14 16:02 ` Denis Kenzior
2025-02-21 16:15 ` Grant Erickson
2025-02-21 17:13 ` Grant Erickson
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.