• Thomas Haller's avatar
    policy: resync routes on platform change events · 16b0ddb6
    Thomas Haller authored
    Monitor default routes from platform, and resync the default routes
    on changes.
    For one, this fixes the following use-case: have an assumed device em1
    with two routes of metric 20 and 21. Activate em2, which will get effective
    metric 22.
    When externally removing route em1/20, em2 would resync the effective metric to
    20. This is correct and already worked before. However, when deleting em1/21,
    nothing happened. With this change, em2 would resync to metric 21 to fill the gap.
    However this commit has much bigger effects: whenever the user externally adds
    a default route to an interface for which NM manages an default route, NM will
    delete it.
    Also, when deleting the default route (managed by NM), NM would readd
    it. Effectivly, the user can no longer mess with the default route on
    interfaces for which it manages the default route.
    If the connection is configured never-default, the user still can add
    default routes and NM will not touch them.
    Obviously, this has no effect for assumed devices either and the user
    can externally add and remove default routes as he wishes.
    https://bugzilla.gnome.org/show_bug.cgi?id=735512Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
nm-default-route-manager.c 41.9 KB