svn commit: r269944 - stable/10/sys/netinet6

Andrey V. Elsukov ae at FreeBSD.org
Wed Aug 13 15:48:10 UTC 2014


Author: ae
Date: Wed Aug 13 15:48:10 2014
New Revision: 269944
URL: http://svnweb.freebsd.org/changeset/base/269944

Log:
  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

Modified:
  stable/10/sys/netinet6/in6_src.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet6/in6_src.c
==============================================================================
--- stable/10/sys/netinet6/in6_src.c	Wed Aug 13 15:29:29 2014	(r269943)
+++ stable/10/sys/netinet6/in6_src.c	Wed Aug 13 15:48:10 2014	(r269944)
@@ -443,6 +443,12 @@ in6_selectsrc(struct sockaddr_in6 *dstso
 			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
 		 * documented as "Rule 8".  However, since it is also


More information about the svn-src-stable-10 mailing list