Skip to content
  • Thomas Haller's avatar
    platform: refactor nm_platform_veth_get_properties() · 7cdbc393
    Thomas Haller authored
    For recent kernels, the peer-ifindex of veths is reported as
    parent (IFA_LINK). Prefer that over the ethtool lookup.
    
    For one, this avoids the extra ethtool call which has the
    downside of sidestepping the platform cache. Also, looking
    up the peer-ifindex in ethtool does not report whether the
    peer lifes in another netns (NM_PLATFORM_LINK_OTHER_NETNS).
    
    Only use ethtool as fallback for older kernels.
    7cdbc393