From owner-svn-src-user@FreeBSD.ORG Tue Oct 15 23:19:29 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 96384EAE; Tue, 15 Oct 2013 23:19:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8407D2F57; Tue, 15 Oct 2013 23:19:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9FNJT8c084583; Tue, 15 Oct 2013 23:19:29 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9FNJTJ0084575; Tue, 15 Oct 2013 23:19:29 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201310152319.r9FNJTJ0084575@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 15 Oct 2013 23:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256564 - user/ae/inet6/sys/netinet X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2013 23:19:29 -0000 Author: ae Date: Tue Oct 15 23:19:28 2013 New Revision: 256564 URL: http://svnweb.freebsd.org/changeset/base/256564 Log: Initialize zoneid if src or dst address is from link-local scope. Modified: user/ae/inet6/sys/netinet/tcp_input.c user/ae/inet6/sys/netinet/tcp_subr.c Modified: user/ae/inet6/sys/netinet/tcp_input.c ============================================================================== --- user/ae/inet6/sys/netinet/tcp_input.c Tue Oct 15 21:28:51 2013 (r256563) +++ user/ae/inet6/sys/netinet/tcp_input.c Tue Oct 15 23:19:28 2013 (r256564) @@ -98,6 +98,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1060,6 +1061,11 @@ relocked: inc.inc_flags |= INC_ISIPV6; inc.inc6_faddr = ip6->ip6_src; inc.inc6_laddr = ip6->ip6_dst; + if (IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src) || + IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_dst)) + inc.inc6_zoneid = in6_getscopezone( + m->m_pkthdr.rcvif, + IPV6_ADDR_SCOPE_LINKLOCAL); } else #endif { Modified: user/ae/inet6/sys/netinet/tcp_subr.c ============================================================================== --- user/ae/inet6/sys/netinet/tcp_subr.c Tue Oct 15 21:28:51 2013 (r256563) +++ user/ae/inet6/sys/netinet/tcp_subr.c Tue Oct 15 23:19:28 2013 (r256564) @@ -1569,6 +1569,10 @@ tcp6_ctlinput(int cmd, struct sockaddr * inc.inc6_faddr = ((struct sockaddr_in6 *)sa)->sin6_addr; inc.inc6_laddr = ip6cp->ip6c_src->sin6_addr; inc.inc_flags |= INC_ISIPV6; + if (IN6_IS_ADDR_LINKLOCAL(&inc.inc6_laddr) || + IN6_IS_ADDR_LINKLOCAL(&inc.inc6_faddr)) + inc.inc6_zoneid = in6_getscopezone(m->m_pkthdr.rcvif, + IPV6_ADDR_SCOPE_LINKLOCAL); INP_INFO_WLOCK(&V_tcbinfo); syncache_unreach(&inc, &th); INP_INFO_WUNLOCK(&V_tcbinfo);