• Beniamino Galvani's avatar
    policy: track best active connections rather than best devices · 522e49ed
    Beniamino Galvani authored
    If a VPN with default route is activated, the Manager's
    PrimaryConnection property is not updated to indicate the VPN as
    primary connection.
    
    This happens because the PrimaryConnection property gets updated when
    the default_ipX_device property of NMPolicy changes, and the primary
    connection is set to the activation request currently pending on the
    default device. We select the base (for example, ethernet) device as
    best device and therefore the NMActRequest active on it is selected as
    primary connection.
    
    This patch fixes the problem by properly selecting the VPN as
    primary. It seems a better choice to track best active connections
    directly from NMPolicy instead of going through two steps.
    522e49ed
nm-policy.h 2.85 KB