diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2012-04-05 12:00:53 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-04-05 14:18:46 +0300 |
commit | 5cd592480e57608c5306ed743c23b3cc2d98455a (patch) | |
tree | 6b9a691a05bd886c8052ad7f6a40b63d758bb7bf | |
parent | a5b2875fca80a2b8b3cfe29191ac77639d5aaca6 (diff) | |
download | connman-5cd592480e57608c5306ed743c23b3cc2d98455a.tar.gz connman-5cd592480e57608c5306ed743c23b3cc2d98455a.tar.bz2 connman-5cd592480e57608c5306ed743c23b3cc2d98455a.zip |
connection: Remove original default route only when needed
If the new VPN gateway has split routing set, then do not
clear original default route because VPN will not set the
default route. Without this check we would not get any
proper default route set.
-rw-r--r-- | src/connection.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/connection.c b/src/connection.c index a679619d..11e42c9b 100644 --- a/src/connection.c +++ b/src/connection.c @@ -820,14 +820,20 @@ int __connman_connection_gateway_add(struct connman_service *service, if (type == CONNMAN_IPCONFIG_TYPE_IPV4 && new_gateway->ipv4_gateway != NULL && new_gateway->ipv4_gateway->vpn == TRUE) { - connman_inet_clear_gateway_address(active_gateway->index, + if (__connman_service_is_split_routing(new_gateway->service) == + FALSE) + connman_inet_clear_gateway_address( + active_gateway->index, active_gateway->ipv4_gateway->gateway); } if (type == CONNMAN_IPCONFIG_TYPE_IPV6 && new_gateway->ipv6_gateway != NULL && new_gateway->ipv6_gateway->vpn == TRUE) { - connman_inet_clear_ipv6_gateway_address(active_gateway->index, + if (__connman_service_is_split_routing(new_gateway->service) == + FALSE) + connman_inet_clear_ipv6_gateway_address( + active_gateway->index, active_gateway->ipv6_gateway->gateway); } |