Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Aug 2014 15:48:10 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r269944 - stable/10/sys/netinet6
Message-ID:  <201408131548.s7DFmATv095070@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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