Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Apr 2016 11:13:24 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r297705 - head/sys/netinet6
Message-ID:  <201604081113.u38BDObQ084864@repo.freebsd.org>

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



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