Date: Thu, 17 Oct 2013 11:33:16 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256674 - user/ae/inet6/sys/netinet6 Message-ID: <201310171133.r9HBXGZK037877@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310171133.r9HBXGZK037877>