summaryrefslogtreecommitdiff
path: root/plugins/openvpn.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/openvpn.c')
-rw-r--r--plugins/openvpn.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/openvpn.c b/plugins/openvpn.c
index 24aa0bc7..410cfbd7 100644
--- a/plugins/openvpn.c
+++ b/plugins/openvpn.c
@@ -43,6 +43,7 @@
static DBusConnection *connection;
struct ov_route {
+ int family;
char *host;
char *netmask;
char *gateway;
@@ -64,8 +65,8 @@ static void ov_provider_append_routes(gpointer key, gpointer value,
struct ov_route *route = value;
struct connman_provider *provider = user_data;
- connman_provider_append_route(provider, route->host, route->netmask,
- route->gateway);
+ connman_provider_append_route(provider, route->family, route->host,
+ route->netmask, route->gateway);
}
static struct ov_route *ov_route_lookup(const char *key, const char *prefix_key,
@@ -95,6 +96,8 @@ static struct ov_route *ov_route_lookup(const char *key, const char *prefix_key,
return NULL;
}
+ route->family = AF_INET;
+
g_hash_table_replace(routes, GINT_TO_POINTER(idx),
route);
}