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

Andrey V. Elsukov ae at FreeBSD.org
Fri Apr 11 21:48:42 UTC 2014


Author: ae
Date: Fri Apr 11 21:48:41 2014
New Revision: 264358
URL: http://svnweb.freebsd.org/changeset/base/264358

Log:
  Application can use a global address belonging to the interface other
  than the outgoing.
  
  Found and tested by:	bind9

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	Fri Apr 11 21:14:10 2014	(r264357)
+++ user/ae/inet6/sys/netinet6/in6_src.c	Fri Apr 11 21:48:41 2014	(r264358)
@@ -411,9 +411,9 @@ check_addrs(const struct sockaddr_in6 *s
 	struct in6_ifaddr *ia;
 
 	/*
-	 * Check that source address is available on the interface.
+	 * Check that source address is available.
 	 */
-	ia = in6ifa_ifpwithaddr(ifp, &src->sin6_addr);
+	ia = in6ifa_ifwithaddr(&src->sin6_addr, src->sin6_scope_id);
 	if (ia == NULL || (
 	    ia->ia6_flags & (IN6_IFF_ANYCAST | IN6_IFF_NOTREADY))) {
 		if (ia != NULL)


More information about the svn-src-user mailing list