Skip to content
  • Thomas Haller's avatar
    platform: remove unnecessary NMPlatformLink.inet6_token.is_valid field · e5f63f2a
    Thomas Haller authored and Lubomir Rintel's avatar Lubomir Rintel committed
    The only user of platform who accesses this field is NMDevice,
    when calling nm_platform_link_get_ipv6_token(). It cares more
    about whether the token is all-zero or set to something.
    
    Another use of inet6_token.is_valid was so that when we receive a
    netlink message without IFLA_INET6_TOKEN attribute, that we don't
    treat the value as zero, although it is just unknown. Fix that
    instead in a better way by setting the value from the cache, if
    IFLA_AF_SPEC doesn't provide it.
    
    Also, when printing the token in nm_platform_link_to_string()
    treat it as an IPv6 address (inet_ntop).
    e5f63f2a