The default gateway for ppp connection should be 0.0.0.0 for ipv4
and :: for ipv6. This issue fixed before but removed by the commit
84a739d0082b89efa8cfbf376abe17937e4bc843
---
 src/connection.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/connection.c b/src/connection.c
index 4f3b3f8..d013c9e 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -453,6 +453,17 @@ int __connman_connection_gateway_add(struct 
connman_service *service,
        DBG("service %p index %d gateway %s vpn ip %s type %d",
                service, index, gateway, peer, type);
 
+       /*
+        * If gateway is NULL, it's a point to point link and the default
+        * gateway for ipv4 is 0.0.0.0 and for ipv6 is ::, meaning the
+        * interface
+        */
+       if (gateway == NULL && type == CONNMAN_IPCONFIG_TYPE_IPV4)
+               gateway = "0.0.0.0";
+
+       if (gateway == NULL && type == CONNMAN_IPCONFIG_TYPE_IPV6)
+               gateway = "::";
+
        active_gateway = find_active_gateway();
        new_gateway = add_gateway(service, index, gateway, type);
        if (new_gateway == NULL)
-- 
1.7.2.2

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to