Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Dec 2013 20:04:35 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r258935 - user/ae/inet6/sys/netinet6
Message-ID:  <201312042004.rB4K4ZRk064129@svn.freebsd.org>

index | next in thread | raw e-mail

Author: ae
Date: Wed Dec  4 20:04:34 2013
New Revision: 258935
URL: http://svnweb.freebsd.org/changeset/base/258935

Log:
  Use zone id from inpcb when connection has link-local scope and
  caller did not specified outgoing interface.

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

Modified: user/ae/inet6/sys/netinet6/ip6_output.c
==============================================================================
--- user/ae/inet6/sys/netinet6/ip6_output.c	Wed Dec  4 20:03:55 2013	(r258934)
+++ user/ae/inet6/sys/netinet6/ip6_output.c	Wed Dec  4 20:04:34 2013	(r258935)
@@ -724,7 +724,13 @@ again:
 					IP6STAT_INC(ip6s_badscope);
 					goto bad;
 				}
-			} else if (IN6_IS_ADDR_LINKLOCAL(&dst->sin6_addr) ||
+			}
+			if (inp != NULL && inp->in6p_zoneid != 0) {
+				ifp = in6_getlinkifnet(inp->in6p_zoneid);
+				if (ifp != NULL)
+					goto oif_found;
+			}
+			if (IN6_IS_ADDR_LINKLOCAL(&dst->sin6_addr) ||
 			    IN6_IS_ADDR_MC_INTFACELOCAL(&dst->sin6_addr) ||
 			    IN6_IS_ADDR_MC_LINKLOCAL(&dst->sin6_addr)) {
 				/*


help

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