svn commit: r256693 - user/ae/inet6/sys/netinet6
Andrey V. Elsukov
ae at FreeBSD.org
Thu Oct 17 17:44:58 UTC 2013
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)
More information about the svn-src-user
mailing list