diff options
author | Thomas Haller <thaller@redhat.com> | 2017-08-30 11:46:42 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-09-08 11:11:21 +0200 |
commit | 77ec302714795f905301d500b9aab6c88001f32e (patch) | |
tree | 3e55697d2e25f6b4db765178e11cc0805e4f6a3f /src/nm-netns.c | |
parent | 0918b4914d03ec14f71b3e56178c44a6ec648b34 (diff) | |
download | NetworkManager-th/platform-route-pt4.tar.gz |
core: rework handling of default-routes and drop NMDefaultRouteManagerth/platform-route-pt4
Remove NMDefaultRouteManager. Instead, add the default-route to the
NMIP4Config/NMIP6Config instance.
This basically reverts commit e8824f6a5205ffcf761abd3e0897a22b254c7797.
We added NMDefaultRouteManager because we used the corresponding to `ip
route replace` when configuring routes. That would replace default-routes
on other interfaces so we needed a central manager to coordinate routes.
Now, we use the corresponding of `ip route append` to configure routes,
and each interface can configure routes indepdentently.
In NMDevice, when creating the default-route, ignore @auto_method for
external devices. We shall not touch these devices.
Especially the code in NMPolicy regarding selection of the best-device
seems wrong. It probably needs further adjustments in the future.
Especially get_best_ip_config() should be replaced, because this
distinction VPN vs. devices seems wrong to me.
Thereby, remove the @ignore_never_default argument. It was added by
commit bb750260045239ab85574366bae8102eff8058cc, I don't think it's
needed anymore.
This brings another change. Now that we track default-routes in
NMIP4Config/NMIP6Config, they are also exposed on D-Bus like regular
routes. I think that makes sense, but it is a change in behavior, as
previously such routes were not exposed there.
Diffstat (limited to 'src/nm-netns.c')
-rw-r--r-- | src/nm-netns.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/nm-netns.c b/src/nm-netns.c index 8069cfccc3..96ab2b3550 100644 --- a/src/nm-netns.c +++ b/src/nm-netns.c @@ -26,7 +26,6 @@ #include "platform/nm-platform.h" #include "platform/nmp-netns.h" -#include "nm-default-route-manager.h" #include "nm-core-internal.h" #include "NetworkManagerUtils.h" @@ -39,7 +38,6 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( typedef struct { NMPlatform *platform; NMPNetns *platform_netns; - NMDefaultRouteManager *default_route_manager; bool log_with_ptr; } NMNetnsPrivate; @@ -80,12 +78,6 @@ nm_netns_get_multi_idx (NMNetns *self) return nm_platform_get_multi_idx (NM_NETNS_GET_PRIVATE (self)->platform); } -NMDefaultRouteManager * -nm_netns_get_default_route_manager (NMNetns *self) -{ - return NM_NETNS_GET_PRIVATE (self)->default_route_manager; -} - /*****************************************************************************/ static void @@ -129,7 +121,6 @@ constructed (GObject *object) log_with_ptr = nm_platform_get_log_with_ptr (priv->platform); priv->platform_netns = nm_platform_netns_get (priv->platform); - priv->default_route_manager = nm_default_route_manager_new (log_with_ptr, priv->platform); G_OBJECT_CLASS (nm_netns_parent_class)->constructed (object); } @@ -148,7 +139,6 @@ dispose (GObject *object) NMNetns *self = NM_NETNS (object); NMNetnsPrivate *priv = NM_NETNS_GET_PRIVATE (self); - g_clear_object (&priv->default_route_manager); g_clear_object (&priv->platform); G_OBJECT_CLASS (nm_netns_parent_class)->dispose (object); |