svn commit: r266739 - user/ae/inet6/sys/netinet6

Andrey V. Elsukov ae at FreeBSD.org
Tue May 27 08:30:06 UTC 2014


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.


More information about the svn-src-user mailing list