[PATCH] gateway: Fix __connman_connection_gateway_add is_vpn6 calculation.
Grant Erickson <[email protected]>
| Newsgroups | dev.linux.lists.connman |
|---|---|
| Message-ID | <5e1a105eda4ae36e7a9132140949c569cd02fe02.1740157858.git.gerickson@nuovations.com> |
Address a regression introduced in commit 823d5a2a8cc4 ("connection:
Refactor '__connman_connection_gateway_add'.") in which the 'is_vpn6'
calculation was inadvertently copied-and-pasted from the 'is_vpn4'
calculation by correctly using the associated IPv6-related
'new_gateway' data members.
This stops WireGuard and other VPN-related plugins from faulting on
start-up.
Suggested-by: Gabriel Sanches <[email protected]>
Signed-off-by: Gabriel Sanches <[email protected]>
Tested-by: Christian Hewitt <[email protected]>
---
src/gateway.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gateway.c b/src/gateway.c
index 16c87f83b4d6..b2c211e2dc8d 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.45.0