svn commit: r297705 - head/sys/netinet6

Andrey V. Elsukov ae at FreeBSD.org
Fri Apr 8 11:13:25 UTC 2016


Author: ae
Date: Fri Apr  8 11:13:24 2016
New Revision: 297705
URL: https://svnweb.freebsd.org/changeset/base/297705

Log:
  Fix regression introduced in r296986.
  
  Currently we don't keep zoneid in in6_ifaddr structure, because there
  is still some code, that doesn't properly initialize sin6_scope_id,
  but some functions use sa_equal() for addresses comparison. sa_equal()
  compares full sockaddr_in6 structures and such comparison will fail.
  For now use zero zoneid in in6ifa_ifwithaddr(). It is safe, because
  used address is in embedded form. In future we will use zoneid, so mark it
  with XXX comment.
  
  Reported by:	kp
  Tested by:	kp

Modified:
  head/sys/netinet6/in6_src.c

Modified: head/sys/netinet6/in6_src.c
==============================================================================
--- head/sys/netinet6/in6_src.c	Fri Apr  8 10:59:06 2016	(r297704)
+++ head/sys/netinet6/in6_src.c	Fri Apr  8 11:13:24 2016	(r297705)
@@ -255,7 +255,7 @@ in6_selectsrc(uint32_t fibnum, struct so
 		 * ancillary data.
 		 */
 		if ((inp->inp_flags & INP_BINDANY) == 0) {
-			ia = in6ifa_ifwithaddr(&tmp, odstzone);
+			ia = in6ifa_ifwithaddr(&tmp, 0 /* XXX */);
 			if (ia == NULL || (ia->ia6_flags & (IN6_IFF_ANYCAST |
 			    IN6_IFF_NOTREADY))) {
 				if (ia != NULL)


More information about the svn-src-all mailing list