• Erik Kline's avatar
    net: ipv6: allow explicitly choosing optimistic addresses · c58da4c6
    Erik Kline authored
    RFC 4429 ("Optimistic DAD") states that optimistic addresses
    should be treated as deprecated addresses.  From section 2.1:
    
       Unless noted otherwise, components of the IPv6 protocol stack
       should treat addresses in the Optimistic state equivalently to
       those in the Deprecated state, indicating that the address is
       available for use but should not be used if another suitable
       address is available.
    
    Optimistic addresses are indeed avoided when other addresses are
    available (i.e. at source address selection time), but they have
    not heretofore been available for things like explicit bind() and
    sendmsg() with struct in6_pktinfo, etc.
    
    This change makes optimistic addresses treated more like
    deprecated addresses than tentative ones.
    Signed-off-by: default avatarErik Kline <ek@google.com>
    Acked-by: default avatarLorenzo Colitti <lorenzo@google.com>
    Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c58da4c6
addrconf.h 10.3 KB