From 1339c2b9108c95d65b1eb2ada00c64be76008e5d Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Tue, 21 Dec 2010 12:50:31 +0100 Subject: [PATCH] connection: Add gateway host routes for non NULL gateways --- src/connection.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/connection.c b/src/connection.c index bac700f..cb0ca22 100644 --- a/src/connection.c +++ b/src/connection.c @@ -320,9 +320,12 @@ static int connection_probe(struct connman_element *element) service = __connman_element_get_service(element); - connman_inet_add_ipv6_host_route(element->index, + if (new_gateway->ipv6_gateway) + connman_inet_add_ipv6_host_route(element->index, new_gateway->ipv6_gateway, NULL); - connman_inet_add_host_route(element->index, + + if (g_strcmp0(new_gateway->ipv4_gateway, "0.0.0.0")) + connman_inet_add_host_route(element->index, new_gateway->ipv4_gateway, NULL); __connman_service_nameserver_add_routes(service, new_gateway->ipv4_gateway); -- 2.7.4