mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 01:10:08 +01:00
default-route-manager: use explict platform instance instead of NM_PLATFORM_GET singleton
This commit is contained in:
parent
3ba9444728
commit
fc53700fce
1 changed files with 5 additions and 5 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue