Skip to content
  • Thomas Haller's avatar
    policy: remove redundant remove_default_route() functions from NMDefaultRouteManager · 462456f2
    Thomas Haller authored
    
    
    When calling update_default_route(), NMDefaultRouteManager will look at the
    source, and determine whether it has a default route or not. For example
    for device sources, this means calling nm_device_get_ip4_default_route().
    
    If the source indicates that it has no default route, the effect of
    calling update_default_route() is the same as calling
    remove_default_route() (hence, remove() can be replaced by update()).
    
    If the source however still indicates a default route, the behavior
    would be different. This case would be an undesired inconsistancy,
    because source and NMDefaultRouteManager would disagree of whether
    the source has a default route.
    Source must always properly indicate whether it has a default route
    or not, hence this situation does not arise.
    
    Hence it is always better to call update().
    
    Signed-off-by: default avatarThomas Haller <thaller@redhat.com>
    462456f2