From owner-svn-src-user@FreeBSD.ORG Thu Oct 17 17:44:58 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 13F83E3D; Thu, 17 Oct 2013 17:44:58 +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 01A8624C2; Thu, 17 Oct 2013 17:44:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9HHiv9O035490; Thu, 17 Oct 2013 17:44:57 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9HHiv4R035489; Thu, 17 Oct 2013 17:44:57 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201310171744.r9HHiv4R035489@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 17 Oct 2013 17:44:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256693 - user/ae/inet6/sys/netinet6 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: Thu, 17 Oct 2013 17:44:58 -0000 Author: ae Date: Thu Oct 17 17:44:57 2013 New Revision: 256693 URL: http://svnweb.freebsd.org/changeset/base/256693 Log: Remove in6_clearscope() and initialize sin6_scope_id instead of sa6_recoverscope() Modified: user/ae/inet6/sys/netinet6/icmp6.c Modified: user/ae/inet6/sys/netinet6/icmp6.c ============================================================================== --- user/ae/inet6/sys/netinet6/icmp6.c Thu Oct 17 17:25:00 2013 (r256692) +++ user/ae/inet6/sys/netinet6/icmp6.c Thu Oct 17 17:44:57 2013 (r256693) @@ -1910,7 +1910,6 @@ ni6_store_addrs(struct icmp6_nodeinfo *n /* copy the address itself */ bcopy(&ifa6->ia_addr.sin6_addr, cp, sizeof(struct in6_addr)); - in6_clearscope((struct in6_addr *)cp); /* XXX */ cp += sizeof(struct in6_addr); resid -= (sizeof(struct in6_addr) + sizeof(u_int32_t)); @@ -1957,20 +1956,12 @@ icmp6_rip6_input(struct mbuf **mp, int o return (IPPROTO_DONE); } #endif - - /* - * XXX: the address may have embedded scope zone ID, which should be - * hidden from applications. - */ bzero(&fromsa, sizeof(fromsa)); fromsa.sin6_family = AF_INET6; fromsa.sin6_len = sizeof(struct sockaddr_in6); fromsa.sin6_addr = ip6->ip6_src; - if (sa6_recoverscope(&fromsa)) { - m_freem(m); - return (IPPROTO_DONE); - } - + fromsa.sin6_scope_id = in6_getscopezone(m->m_pkthdr.rcvif, + in6_addrscope(&ip6->ip6_src)); INP_INFO_RLOCK(&V_ripcbinfo); LIST_FOREACH(in6p, &V_ripcb, inp_list) { if ((in6p->inp_vflag & INP_IPV6) == 0)