From owner-svn-src-user@FreeBSD.ORG Thu Oct 17 14:20:45 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 84191FB5; Thu, 17 Oct 2013 14:20:45 +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 70B382431; Thu, 17 Oct 2013 14:20:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9HEKj1a027862; Thu, 17 Oct 2013 14:20:45 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9HEKj76027859; Thu, 17 Oct 2013 14:20:45 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201310171420.r9HEKj76027859@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 17 Oct 2013 14:20:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256688 - 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 14:20:45 -0000 Author: ae Date: Thu Oct 17 14:20:44 2013 New Revision: 256688 URL: http://svnweb.freebsd.org/changeset/base/256688 Log: Remove in6_setscope() from ni6_input() and use m_pulldown() instead of m_copydata(). 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 14:18:11 2013 (r256687) +++ user/ae/inet6/sys/netinet6/icmp6.c Thu Oct 17 14:20:44 2013 (r256688) @@ -1231,7 +1231,6 @@ ni6_input(struct mbuf *m, int off) struct ni_reply_fqdn *fqdn; int addrs; /* for NI_QTYPE_NODEADDR */ struct ifnet *ifp = NULL; /* for NI_QTYPE_NODEADDR */ - struct in6_addr in6_subj; /* subject address */ struct ip6_hdr *ip6; int oldfqdn = 0; /* if 1, return pascal string (03 draft) */ char *subj = NULL; @@ -1283,8 +1282,7 @@ ni6_input(struct mbuf *m, int off) in6_getscopezone(m->m_pkthdr.rcvif, in6_addrscope(&ip6->ip6_dst))); if (ia6 == NULL) - goto bad; /* XXX impossible */ - + goto bad; if ((ia6->ia6_flags & IN6_IFF_TEMPORARY) && !(V_icmp6_nodeinfo & ICMP6_NODEINFO_TMPADDROK)) { ifa_free(&ia6->ia_ifa); @@ -1345,14 +1343,10 @@ ni6_input(struct mbuf *m, int off) * * We do not do proxy at this moment. */ - /* m_pulldown instead of copy? */ - m_copydata(m, off + sizeof(struct icmp6_nodeinfo), - subjlen, (caddr_t)&in6_subj); - if (in6_setscope(&in6_subj, m->m_pkthdr.rcvif, NULL)) - goto bad; - - subj = (char *)&in6_subj; - if (IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &in6_subj)) + subj = (char *)m_pulldown(m, off + + sizeof(struct icmp6_nodeinfo), subjlen, NULL); + if (IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, + (struct in6_addr *)subj)) break; /*