MFC r269306:

Add new rule to source address selection algorithm. It prefers address
  with better virtual status. Use ifa_preferred() to choose better address.

PR:		187341
This commit is contained in:
ae 2014-08-13 15:48:10 +00:00
parent 2a5e29a8c2
commit 809079ca2d

View File

@ -442,6 +442,12 @@ in6_selectsrc(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
(ia->ia_ifp->if_flags & IFF_UP))
REPLACE(8);
/*
* Rule 9: prefer address with better virtual status.
*/
if (ifa_preferred(&ia_best->ia_ifa, &ia->ia_ifa))
REPLACE(9);
/*
* Rule 14: Use longest matching prefix.
* Note: in the address selection draft, this rule is