From owner-svn-src-user@FreeBSD.ORG Thu Oct 17 11:33:17 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 022407C2; Thu, 17 Oct 2013 11:33:17 +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 E434527B2; Thu, 17 Oct 2013 11:33:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9HBXG7I037878; Thu, 17 Oct 2013 11:33:16 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9HBXGZK037877; Thu, 17 Oct 2013 11:33:16 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201310171133.r9HBXGZK037877@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 17 Oct 2013 11:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256674 - 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 11:33:17 -0000 Author: ae Date: Thu Oct 17 11:33:16 2013 New Revision: 256674 URL: http://svnweb.freebsd.org/changeset/base/256674 Log: Remove in6_setscope() calls and save ifnet pointer in the mbuf to be able disambiguate the scope. 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 10:53:57 2013 (r256673) +++ user/ae/inet6/sys/netinet6/icmp6.c Thu Oct 17 11:33:16 2013 (r256674) @@ -232,23 +232,7 @@ icmp6_error2(struct mbuf *m, int type, i if (ifp == NULL) return; -#ifndef PULLDOWN_TEST - IP6_EXTHDR_CHECK(m, 0, sizeof(struct ip6_hdr), ); -#else - if (m->m_len < sizeof(struct ip6_hdr)) { - m = m_pullup(m, sizeof(struct ip6_hdr)); - if (m == NULL) - return; - } -#endif - - ip6 = mtod(m, struct ip6_hdr *); - - if (in6_setscope(&ip6->ip6_src, ifp, NULL) != 0) - return; - if (in6_setscope(&ip6->ip6_dst, ifp, NULL) != 0) - return; - + m->m_pkthdr.rcvif = ifp; icmp6_error(m, type, code, param); }