diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2012-04-03 14:04:46 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-04-05 15:37:51 +0300 |
commit | 09dc17597fd7597cdcb290578dfb42e28fdcc4f4 (patch) | |
tree | 76b29fe0a50f90d29e87fb64b1ea86340772a897 /src/connection.c | |
parent | 631fa9778980a444811d2554b75a2a35dfcb0e28 (diff) | |
download | connman-09dc17597fd7597cdcb290578dfb42e28fdcc4f4.tar.gz connman-09dc17597fd7597cdcb290578dfb42e28fdcc4f4.tar.bz2 connman-09dc17597fd7597cdcb290578dfb42e28fdcc4f4.zip |
connection: Add host route for VPN when setting default gateway
This is needed so that VPN gets default route when moving
services. That can happen if VPN did not had default route
before.
Diffstat (limited to 'src/connection.c')
-rw-r--r-- | src/connection.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/connection.c b/src/connection.c index a2acc515..3747c051 100644 --- a/src/connection.c +++ b/src/connection.c @@ -360,6 +360,8 @@ static void set_default_gateway(struct gateway_data *data, data->ipv4_gateway->vpn == TRUE) { connman_inet_set_gateway_address(data->index, data->ipv4_gateway->vpn_ip); + connman_inet_add_host_route(data->index, + data->ipv4_gateway->vpn_ip, NULL); data->ipv4_gateway->active = TRUE; DBG("set %p index %d vpn %s index %d phy %s", @@ -376,6 +378,8 @@ static void set_default_gateway(struct gateway_data *data, data->ipv6_gateway->vpn == TRUE) { connman_inet_set_ipv6_gateway_address(data->index, data->ipv6_gateway->vpn_ip); + connman_inet_add_ipv6_host_route(data->index, + data->ipv6_gateway->vpn_ip, NULL); data->ipv6_gateway->active = TRUE; DBG("set %p index %d vpn %s index %d phy %s", |