device: always pickup externally configured default routes for a device

System Internals / NetworkManager - Thomas Haller [redhat.com] - 24 January 2015 11:27 UTC

Even more eagerly pickup external default routes from the device. For assumed devices we already picked up the default route.

(a) For assumed devices we already did not enforce the default route at all. Instead it was always picked up by from the actualy system configuration. Note that this is the case for assumed-generated connections and for assuming existing connections. That means that when NM assumes a connection at startup, it will never actively manage the default route on that interface. It will only react on what is present.

(b) For managed devices that have by configuration no default route, still pick up the default route. That means, that even a device that is managed and never-default=yes, can have the default route -- if configured externally.

(c) Only during a commit phase (i.e. when we have new configuraiton to be applied), we enforce the default route or its absence.

(d) During any IP change event from platform, we again pickup whatever is present. That means if you remove the default route from a managed interface, NM will not re-add it until anything triggers (c).

This also means, that during the commit phase, we add default routes as 'synced' to the default-route-manager, but the following event from platform, will change the route entry immediately to 'non-synced'. That is expected and correct.

da70805 device: always pickup externally configured default routes for a device
src/devices/nm-device.c | 168 ++++++++++++++++++++++++++---------------------
1 file changed, 94 insertions(+), 74 deletions(-)

Upstream: cgit.freedesktop.org


  • Share