Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 May 2014 08:30:06 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r266739 - user/ae/inet6/sys/netinet6
Message-ID:  <201405270830.s4R8U6xU074115@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Tue May 27 08:30:06 2014
New Revision: 266739
URL: http://svnweb.freebsd.org/changeset/base/266739

Log:
  Restore no_prefer_iface flag support in the SAS.
  
  Discussed with:	melifaro

Modified:
  user/ae/inet6/sys/netinet6/in6_src.c

Modified: user/ae/inet6/sys/netinet6/in6_src.c
==============================================================================
--- user/ae/inet6/sys/netinet6/in6_src.c	Tue May 27 08:14:54 2014	(r266738)
+++ user/ae/inet6/sys/netinet6/in6_src.c	Tue May 27 08:30:06 2014	(r266739)
@@ -229,10 +229,12 @@ srcaddrcmp(struct srcaddr_choice *c, str
 	 * XXX: This is a TODO.
 	 */
 	/* Rule 5: Prefer outgoing interface. */
-	if (c->ia->ia_ifp == dst->ifp && ia->ia_ifp != dst->ifp)
-		NEXT(5);
-	if (c->ia->ia_ifp != dst->ifp && ia->ia_ifp == dst->ifp)
-		REPLACE(5);
+	if (!(ND_IFINFO(dst->ifp)->flags & ND6_IFF_NO_PREFER_IFACE)) {
+		if (c->ia->ia_ifp == dst->ifp && ia->ia_ifp != dst->ifp)
+			NEXT(5);
+		if (c->ia->ia_ifp != dst->ifp && ia->ia_ifp == dst->ifp)
+			REPLACE(5);
+	}
 	/*
 	 * Rule 5.5: Prefer addresses in a prefix advertised by
 	 * the next-hop.



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