Back port of upstream patch d9933457:
Back port of upstream patch d9933457:

    commit d99334573b24b9c1a7c9abb2092350341c45b598
    Author: David van Moolenbroek <david@minix3.org>
    Date:   Thu Dec 29 22:13:12 2016 +0000

	nd6: fix Duplicate Address Detection

	Previously, Duplicate Address Detection (DAD) would work only for the
	link-local address. For DAD-spawned Neighbor Solicitation requests for
	any other address, the request would use the link-local address as the
	source, meaning the other side would send a targeted reply (RFC 4861
	Sec. 7.2.4). However, the nd6 implementation currently does not
	consider targeted replies for DAD--even though technically an RFC 4862
	Sec. 5.4.4 violation--supposedly because no real-world scenario could
	trigger that case. The combination of these factors resulted in DAD
	being entirely ineffective for non-link-local addresses.

	This patch forces all DAD-spawned Neighbor Solicitation packets to use
	the unspecified ('any') address as source, as per RFC 4862 Sec. 5.4.2.
	As a result, other nodes would reply with multicast replies, for which
	there is appropriate DAD checking code.

	The patch also makes a slight rearrangement of statements such that
	MLD join messages are sent before the NS packets, rather than after.

openweave/openweave-core,openweave/openweave-core,openweave/openweave-core,openweave/openweave-core,openweave/openweave-core,openweave/openweave-core