summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-03-08 13:42:05 +0100
committerThomas Haller <thaller@redhat.com>2016-03-15 12:56:58 +0100
commitfc53700fce9827fae8e9b24631ebb37bc45efe18 (patch)
tree4dfec2ff0c3c474b21f30df0a6c1c4f47f6dbf55
parent3ba944472853d5221ed83c369a77f80ee7305648 (diff)
downloadNetworkManager-fc53700fce9827fae8e9b24631ebb37bc45efe18.tar.gz
default-route-manager: use explict platform instance instead of NM_PLATFORM_GET singleton
-rw-r--r--src/nm-default-route-manager.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nm-default-route-manager.c b/src/nm-default-route-manager.c
index e2c4eefe45..084749e03a 100644
--- a/src/nm-default-route-manager.c
+++ b/src/nm-default-route-manager.c
@@ -283,7 +283,7 @@ _platform_route_sync_add (const VTableIP *vtable, NMDefaultRouteManager *self, g
return FALSE;
if (vtable->vt->is_ip4) {
- success = nm_platform_ip4_route_add (NM_PLATFORM_GET,
+ success = nm_platform_ip4_route_add (priv->platform,
entry->route.rx.ifindex,
entry->route.rx.source,
0,
@@ -293,7 +293,7 @@ _platform_route_sync_add (const VTableIP *vtable, NMDefaultRouteManager *self, g
entry->effective_metric,
entry->route.rx.mss);
} else {
- success = nm_platform_ip6_route_add (NM_PLATFORM_GET,
+ success = nm_platform_ip6_route_add (priv->platform,
entry->route.rx.ifindex,
entry->route.rx.source,
in6addr_any,
@@ -319,7 +319,7 @@ _platform_route_sync_flush (const VTableIP *vtable, NMDefaultRouteManager *self,
gboolean changed = FALSE;
/* prune all other default routes from this device. */
- routes = vtable->vt->route_get_all (NM_PLATFORM_GET, 0, NM_PLATFORM_GET_ROUTE_FLAGS_WITH_DEFAULT);
+ routes = vtable->vt->route_get_all (priv->platform, 0, NM_PLATFORM_GET_ROUTE_FLAGS_WITH_DEFAULT);
for (i = 0; i < routes->len; i++) {
const NMPlatformIPRoute *route;
@@ -351,7 +351,7 @@ _platform_route_sync_flush (const VTableIP *vtable, NMDefaultRouteManager *self,
*/
if ( !entry
&& (has_ifindex_synced || ifindex_to_flush == route->ifindex)) {
- vtable->vt->route_delete_default (NM_PLATFORM_GET, route->ifindex, route->metric);
+ vtable->vt->route_delete_default (priv->platform, route->ifindex, route->metric);
changed = TRUE;
}
}
@@ -505,7 +505,7 @@ _resync_all (const VTableIP *vtable, NMDefaultRouteManager *self, const Entry *c
entries = vtable->get_entries (priv);
- routes = vtable->vt->route_get_all (NM_PLATFORM_GET, 0, NM_PLATFORM_GET_ROUTE_FLAGS_WITH_DEFAULT);
+ routes = vtable->vt->route_get_all (priv->platform, 0, NM_PLATFORM_GET_ROUTE_FLAGS_WITH_DEFAULT);
assumed_metrics = _get_assumed_interface_metrics (vtable, self, routes);