policy: prefer IPv4 to determine the hostname

Beniamino Galvani requested to merge bg/hostname-prefer-ipv4-rh1970335 into main

When determining the hostname, it is preferable to evaluate devices in a predictable order to avoid that the hostname changes between different boots.

The current order is based first on hostname priority, then on the presence of a best default route, and then on activation order.

The activation order is not a very strong condition, as it is basically useless for devices that are autoactivated at boot.

As we already prefer IPv4 over IPv6 within the same connection, also prefer it when 2 connections have the same priority and the same default route status, to achieve better predictability.


Merge request reports