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