From owner-svn-src-user@FreeBSD.ORG Thu Oct 24 00:28:52 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 7CF18C5B; Thu, 24 Oct 2013 00:28:52 +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 6AC262B5F; Thu, 24 Oct 2013 00:28:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9O0SqeA016852; Thu, 24 Oct 2013 00:28:52 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9O0SqrY016851; Thu, 24 Oct 2013 00:28:52 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201310240028.r9O0SqrY016851@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 24 Oct 2013 00:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r257027 - 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, 24 Oct 2013 00:28:52 -0000 Author: ae Date: Thu Oct 24 00:28:51 2013 New Revision: 257027 URL: http://svnweb.freebsd.org/changeset/base/257027 Log: Remove sa6_embedscope(), use sa6_checkzone() instead. Remove in6_clearscope() calls. 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 Thu Oct 24 00:21:44 2013 (r257026) +++ user/ae/inet6/sys/netinet6/ip6_output.c Thu Oct 24 00:28:51 2013 (r257027) @@ -875,14 +875,6 @@ oif_found: mtu = IPV6_MMTU; } } - - /* - * clear embedded scope identifiers if necessary. - * in6_clearscope will touch the addresses only when necessary. - */ - in6_clearscope(&ip6->ip6_src); - in6_clearscope(&ip6->ip6_dst); - /* * If the outgoing packet contains a hop-by-hop options header, * it must be examined and processed even by the source node. @@ -2801,8 +2793,7 @@ ip6_setpktopt(int optname, u_char *buf, IN6_IS_ADDR_MULTICAST(&sa6->sin6_addr)) { return (EINVAL); } - if ((error = sa6_embedscope(sa6, V_ip6_use_defzone)) - != 0) { + if ((error = sa6_checkzone(sa6)) != 0) { return (error); } break; @@ -3027,7 +3018,6 @@ void ip6_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in6 *dst) { struct mbuf *copym; - struct ip6_hdr *ip6; copym = m_copy(m, 0, M_COPYALL); if (copym == NULL) @@ -3046,20 +3036,11 @@ ip6_mloopback(struct ifnet *ifp, struct } #ifdef DIAGNOSTIC - if (copym->m_len < sizeof(*ip6)) { + if (copym->m_len < sizeof(struct ip6_hdr)) { m_freem(copym); return; } #endif - - ip6 = mtod(copym, struct ip6_hdr *); - /* - * clear embedded scope identifiers if necessary. - * in6_clearscope will touch the addresses only when necessary. - */ - in6_clearscope(&ip6->ip6_src); - in6_clearscope(&ip6->ip6_dst); - (void)if_simloop(ifp, copym, dst->sin6_family, 0); }