In Dual Network where both IPv4 and IPv6 networks are available,
gateway address should be set for both network types.
Currently in following scenario:
- Gateway Address for IPv6 is already available
- IPv4 gateway address is obtained using DHCP.
active_gateway is not NULL as IPv6 gateway was set previously and was
made active so IPv4 Gateway Address is never set. So we should check if
gateway address of the type is active or not, if it is not active then
we should set that gateway address for that type.
---
src/connection.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/connection.c b/src/connection.c
index 8fe9725..03adbd1 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -908,7 +908,8 @@ int __connman_connection_gateway_add(struct connman_service
*service,
new_gateway->ipv6_gateway->vpn = false;
}
- if (!active_gateway) {
+ if (!active_gateway || !active_gateway->ipv4_gateway->active ||
+ !active_gateway->ipv6_gateway->active) {
set_default_gateway(new_gateway, type);
goto done;
}
--
1.9.1
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman