diff options
author | Dan Winship <danw@gnome.org> | 2014-04-25 11:01:21 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-04-29 10:36:54 -0400 |
commit | 7f5b2f81b0b4bf86a0086d4004461e4d1bc95950 (patch) | |
tree | 355dd12fe4f7b6952457aaf7e8dcd1387da8f5a7 | |
parent | b77b7510d6d0777325e48728084764fbb97b806e (diff) | |
download | NetworkManager-7f5b2f81b0b4bf86a0086d4004461e4d1bc95950.tar.gz |
tui: fix route editing (rh #1090422)
NmtRouteTable's ip4-routes and ip6-routes properties have the
D-Bus-based route list types (like the corresponding NMSetting
properties) so we have to convert our GSList-of-NMIP[46]Route data
into those types when updating the property.
https://bugzilla.gnome.org/show_bug.cgi?id=728958
-rw-r--r-- | tui/nmt-route-table.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tui/nmt-route-table.c b/tui/nmt-route-table.c index 75b2b67ae4..d6173a0bc9 100644 --- a/tui/nmt-route-table.c +++ b/tui/nmt-route-table.c @@ -119,7 +119,14 @@ route_list_transform_from_route (GBinding *binding, nm_ip6_route_unref (nth->data); } nth->data = g_value_dup_boxed (source_value); - g_value_take_boxed (target_value, routes); + + if (priv->family == AF_INET) { + nm_utils_ip4_routes_to_gvalue (routes, target_value); + g_slist_free_full (routes, (GDestroyNotify) nm_ip4_route_unref); + } else if (priv->family == AF_INET6) { + nm_utils_ip6_routes_to_gvalue (routes, target_value); + g_slist_free_full (routes, (GDestroyNotify) nm_ip6_route_unref); + } return TRUE; } |