--- src/sys/netinet6/icmp6.c 2005/01/06 17:59:32 1.16 +++ src/sys/netinet6/icmp6.c 2005/02/01 16:09:37 1.17 @@ -1055,7 +1055,6 @@ icmp6_notify_error(struct mbuf *m, int o icmp6dst.sin6_addr = *finaldst; icmp6dst.sin6_scope_id = in6_addr2scopeid(m->m_pkthdr.rcvif, &icmp6dst.sin6_addr); -#ifndef SCOPEDROUTING if (in6_embedscope(&icmp6dst.sin6_addr, &icmp6dst, NULL, NULL)) { /* should be impossbile */ @@ -1063,7 +1062,6 @@ icmp6_notify_error(struct mbuf *m, int o "icmp6_notify_error: in6_embedscope failed\n")); goto freeit; } -#endif /* * retrieve parameters from the inner IPv6 header, and convert @@ -1075,7 +1073,6 @@ icmp6_notify_error(struct mbuf *m, int o icmp6src.sin6_addr = eip6->ip6_src; icmp6src.sin6_scope_id = in6_addr2scopeid(m->m_pkthdr.rcvif, &icmp6src.sin6_addr); -#ifndef SCOPEDROUTING if (in6_embedscope(&icmp6src.sin6_addr, &icmp6src, NULL, NULL)) { /* should be impossbile */ @@ -1083,7 +1080,6 @@ icmp6_notify_error(struct mbuf *m, int o "icmp6_notify_error: in6_embedscope failed\n")); goto freeit; } -#endif icmp6src.sin6_flowinfo = (eip6->ip6_flow & IPV6_FLOWLABEL_MASK); @@ -1277,18 +1273,14 @@ ni6_input(struct mbuf *m, int off) subjlen, (caddr_t)&sin6.sin6_addr); sin6.sin6_scope_id = in6_addr2scopeid(m->m_pkthdr.rcvif, &sin6.sin6_addr); -#ifndef SCOPEDROUTING in6_embedscope(&sin6.sin6_addr, &sin6, NULL, NULL); -#endif bzero(&sin6_d, sizeof(sin6_d)); sin6_d.sin6_family = AF_INET6; /* not used, actually */ sin6_d.sin6_len = sizeof(sin6_d); /* ditto */ sin6_d.sin6_addr = ip6->ip6_dst; sin6_d.sin6_scope_id = in6_addr2scopeid(m->m_pkthdr.rcvif, &ip6->ip6_dst); -#ifndef SCOPEDROUTING in6_embedscope(&sin6_d.sin6_addr, &sin6_d, NULL, NULL); -#endif subj = (char *)&sin6; if (SA6_ARE_ADDR_EQUAL(&sin6, &sin6_d)) break; @@ -2139,7 +2131,7 @@ icmp6_reflect(struct mbuf *m, size_t off ip6->ip6_nxt = IPPROTO_ICMPV6; if (m->m_pkthdr.rcvif) { /* XXX: This may not be the outgoing interface */ - ip6->ip6_hlim = nd_ifinfo[m->m_pkthdr.rcvif->if_index].chlim; + ip6->ip6_hlim = ND_IFINFO(m->m_pkthdr.rcvif)->chlim; } else ip6->ip6_hlim = ip6_defhlim;