Implement optimistic address based on
RFC 4429.
This revision is not really depends on D55015.
However, their IPV6CTL numbers could have
conflicts if I didn't use GRAND as parent commit.
Here is my notes to make reviewing easier.
note on ifconfig: since we don't want the user
to manually set the optimistic flag (RFC 4429 section 3.1),
I didn't update the ifconfig manual just like tentative flag.
note on RFC 4429 Sections:
2.1: done (in6_ifawithifp)
2.2.1: done (nd6_ns_input)
2.2.2: done (nd6_ns_output_fib)
2.3 + 3.2.4: partially without violation (nd6_ns_output_fib).
Since we don't directly have the source address of packet
during nd6_resolve.
I can't return lle of default router without reading
inside the mbuf to get our own source address, AND I don't
want to pullup the mbuf receiving in nd6_resolve.
However, this doesn't violate any rules and *rare* to happen.
if such situation happens, It will behave like before (tenative) if
and only if we don't have an ndp cache entry AND there is no
other address available to be source address of NS.
2.4 + 2.2.3: since RS only sends by rtsold(8), I will
fix it on another review.
In summary, rtsold complains when we don't have link-local
which is *rare* and *not default behavior*.
if link-local is not available it MAY send RS with optimistic
source if other addresses are not available. (rtsold/if.c:166).
3.1: done (in6_update_ifa_internal)
3.2: done
3.3: done