Skip to content
  • Thomas Haller's avatar
    policy: better sync get_best_device() with NMDefaultRouteManager · a94605f9
    Thomas Haller authored
    
    
    NMDefaultRouteManager has a sorted list of routes. Change get_best_device()
    to better consider that list when choosing a best device.
    
    Always prefer the priority as reported from entry->effective_metric
    if the device is registered to have a default route. Before for
    !fully_activated, we choose the metric based on
    nm_device_get_ipx_route_metric().
    
    Add more checks in case of equal priority. For @fully_activated,
    always prefer the device that is sorted by NMDefaultRouteManager.
    For non @fully_activated, prefer the device with an entry.
    
    Signed-off-by: default avatarThomas Haller <thaller@redhat.com>
    a94605f9