Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jul 2014 15:08:12 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269306 - head/sys/netinet6
Message-ID:  <201407301508.s6UF8CKr070346@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Wed Jul 30 15:08:12 2014
New Revision: 269306
URL: http://svnweb.freebsd.org/changeset/base/269306

Log:
  Add new rule to source address selection algorithm. It prefers address
  with better virtual status. Use ifa_preferred() to choose better address.
  
  PR:		187341
  Tested by:	des
  MFC after:	1 week

Modified:
  head/sys/netinet6/in6_src.c

Modified: head/sys/netinet6/in6_src.c
==============================================================================
--- head/sys/netinet6/in6_src.c	Wed Jul 30 15:01:32 2014	(r269305)
+++ head/sys/netinet6/in6_src.c	Wed Jul 30 15:08:12 2014	(r269306)
@@ -444,6 +444,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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407301508.s6UF8CKr070346>