diff options
author | ume <ume@FreeBSD.org> | 2003-10-10 16:04:00 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2003-10-10 16:04:00 +0000 |
commit | a72f1bdb767fa08d3ce42494c037364f31421fb8 (patch) | |
tree | 0a822f1e32a81df06aa7171ff2072981534b44ad /sys | |
parent | 8df937af7e7320438f99077b1d70e8f6a6c15068 (diff) | |
download | FreeBSD-src-a72f1bdb767fa08d3ce42494c037364f31421fb8.zip FreeBSD-src-a72f1bdb767fa08d3ce42494c037364f31421fb8.tar.gz |
nuke SCOPEDROUTING. Though it was there for a long time,
it was never enabled.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet6/icmp6.c | 8 | ||||
-rw-r--r-- | sys/netinet6/in6.c | 19 | ||||
-rw-r--r-- | sys/netinet6/in6_gif.c | 2 | ||||
-rw-r--r-- | sys/netinet6/in6_ifattach.c | 12 | ||||
-rw-r--r-- | sys/netinet6/ip6_forward.c | 2 | ||||
-rw-r--r-- | sys/netinet6/ip6_input.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_output.c | 9 | ||||
-rw-r--r-- | sys/netinet6/nd6.c | 3 |
8 files changed, 0 insertions, 59 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 1a7af9b..32d01ce 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1063,7 +1063,6 @@ icmp6_notify_error(m, off, icmp6len, code) 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 */ @@ -1071,7 +1070,6 @@ icmp6_notify_error(m, off, icmp6len, code) "icmp6_notify_error: in6_embedscope failed\n")); goto freeit; } -#endif /* * retrieve parameters from the inner IPv6 header, and convert @@ -1083,7 +1081,6 @@ icmp6_notify_error(m, off, icmp6len, code) 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 */ @@ -1091,7 +1088,6 @@ icmp6_notify_error(m, off, icmp6len, code) "icmp6_notify_error: in6_embedscope failed\n")); goto freeit; } -#endif icmp6src.sin6_flowinfo = (eip6->ip6_flow & IPV6_FLOWLABEL_MASK); if (finaldst == NULL) @@ -1290,18 +1286,14 @@ ni6_input(m, 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; diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index a60d053..b3b6feb 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -88,11 +88,9 @@ #include <netinet/in.h> #include <netinet/in_var.h> #include <netinet/if_ether.h> -#ifndef SCOPEDROUTING #include <netinet/in_systm.h> #include <netinet/ip.h> #include <netinet/in_pcb.h> -#endif #include <netinet/ip6.h> #include <netinet6/ip6_var.h> @@ -101,9 +99,7 @@ #include <netinet6/ip6_mroute.h> #include <netinet6/in6_ifattach.h> #include <netinet6/scope6_var.h> -#ifndef SCOPEDROUTING #include <netinet6/in6_pcb.h> -#endif #include <net/net_osdep.h> @@ -832,22 +828,18 @@ in6_update_ifa(ifp, ifra, ia) (dst6.sin6_family == AF_INET6)) { int scopeid; -#ifndef SCOPEDROUTING if ((error = in6_recoverscope(&dst6, &ifra->ifra_dstaddr.sin6_addr, ifp)) != 0) return (error); -#endif scopeid = in6_addr2scopeid(ifp, &dst6.sin6_addr); if (dst6.sin6_scope_id == 0) /* user omit to specify the ID. */ dst6.sin6_scope_id = scopeid; else if (dst6.sin6_scope_id != scopeid) return (EINVAL); /* scope ID mismatch. */ -#ifndef SCOPEDROUTING if ((error = in6_embedscope(&dst6.sin6_addr, &dst6, NULL, NULL)) != 0) return (error); dst6.sin6_scope_id = 0; /* XXX */ -#endif } /* * The destination address can be specified only for a p2p or a @@ -1460,7 +1452,6 @@ in6_lifaddr_ioctl(so, cmd, data, ifp, td) break; bcopy(IFA_IN6(ifa), &candidate, sizeof(candidate)); -#ifndef SCOPEDROUTING /* * XXX: this is adhoc, but is necessary to allow * a user to specify fe80::/64 (not /10) for a @@ -1468,7 +1459,6 @@ in6_lifaddr_ioctl(so, cmd, data, ifp, td) */ if (IN6_IS_ADDR_LINKLOCAL(&candidate)) candidate.s6_addr16[1] = 0; -#endif candidate.s6_addr32[0] &= mask.s6_addr32[0]; candidate.s6_addr32[1] &= mask.s6_addr32[1]; candidate.s6_addr32[2] &= mask.s6_addr32[2]; @@ -1481,24 +1471,19 @@ in6_lifaddr_ioctl(so, cmd, data, ifp, td) ia = ifa2ia6(ifa); if (cmd == SIOCGLIFADDR) { -#ifndef SCOPEDROUTING struct sockaddr_in6 *s6; -#endif /* fill in the if_laddrreq structure */ bcopy(&ia->ia_addr, &iflr->addr, ia->ia_addr.sin6_len); -#ifndef SCOPEDROUTING /* XXX see above */ s6 = (struct sockaddr_in6 *)&iflr->addr; if (IN6_IS_ADDR_LINKLOCAL(&s6->sin6_addr)) { s6->sin6_addr.s6_addr16[1] = 0; s6->sin6_scope_id = in6_addr2scopeid(ifp, &s6->sin6_addr); } -#endif if ((ifp->if_flags & IFF_POINTOPOINT) != 0) { bcopy(&ia->ia_dstaddr, &iflr->dstaddr, ia->ia_dstaddr.sin6_len); -#ifndef SCOPEDROUTING /* XXX see above */ s6 = (struct sockaddr_in6 *)&iflr->dstaddr; if (IN6_IS_ADDR_LINKLOCAL(&s6->sin6_addr)) { s6->sin6_addr.s6_addr16[1] = 0; @@ -1506,7 +1491,6 @@ in6_lifaddr_ioctl(so, cmd, data, ifp, td) in6_addr2scopeid(ifp, &s6->sin6_addr); } -#endif } else bzero(&iflr->dstaddr, sizeof(iflr->dstaddr)); @@ -1836,9 +1820,6 @@ in6_is_addr_deprecated(sa6) for (ia = in6_ifaddr; ia; ia = ia->ia_next) { if (IN6_ARE_ADDR_EQUAL(&ia->ia_addr.sin6_addr, &sa6->sin6_addr) && -#ifdef SCOPEDROUTING - ia->ia_addr.sin6_scope_id == sa6->sin6_scope_id && -#endif (ia->ia6_flags & IN6_IFF_DEPRECATED) != 0) return (1); /* true */ diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c index 748838b..fae8a98 100644 --- a/sys/netinet6/in6_gif.c +++ b/sys/netinet6/in6_gif.c @@ -328,9 +328,7 @@ gif_validate6(ip6, sc, ifp) sin6.sin6_family = AF_INET6; sin6.sin6_len = sizeof(struct sockaddr_in6); sin6.sin6_addr = ip6->ip6_src; -#ifndef SCOPEDROUTING sin6.sin6_scope_id = 0; /* XXX */ -#endif rt = rtalloc1((struct sockaddr *)&sin6, 0, 0UL); if (!rt || rt->rt_ifp != ifp) { diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 479d8b0..6b9707c 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -444,11 +444,7 @@ in6_ifattach_linklocal(ifp, altifp) ifra.ifra_addr.sin6_family = AF_INET6; ifra.ifra_addr.sin6_len = sizeof(struct sockaddr_in6); ifra.ifra_addr.sin6_addr.s6_addr16[0] = htons(0xfe80); -#ifdef SCOPEDROUTING - ifra.ifra_addr.sin6_addr.s6_addr16[1] = 0 -#else ifra.ifra_addr.sin6_addr.s6_addr16[1] = htons(ifp->if_index); /* XXX */ -#endif ifra.ifra_addr.sin6_addr.s6_addr32[1] = 0; if ((ifp->if_flags & IFF_LOOPBACK) != 0) { ifra.ifra_addr.sin6_addr.s6_addr32[2] = 0; @@ -460,18 +456,10 @@ in6_ifattach_linklocal(ifp, altifp) return (-1); } } -#ifdef SCOPEDROUTING - ifra.ifra_addr.sin6_scope_id = - in6_addr2scopeid(ifp, &ifra.ifra_addr.sin6_addr); -#endif ifra.ifra_prefixmask.sin6_len = sizeof(struct sockaddr_in6); ifra.ifra_prefixmask.sin6_family = AF_INET6; ifra.ifra_prefixmask.sin6_addr = in6mask64; -#ifdef SCOPEDROUTING - /* take into accound the sin6_scope_id field for routing */ - ifra.ifra_prefixmask.sin6_scope_id = 0xffffffff; -#endif /* link-local addresses should NEVER expire. */ ifra.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME; ifra.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index 0d1c4ca..6414ab5 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -508,14 +508,12 @@ ip6_forward(m, srcrt) } else origifp = rt->rt_ifp; -#ifndef SCOPEDROUTING /* * clear embedded scope identifiers if necessary. * in6_clearscope will touch the addresses only when necessary. */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); -#endif #ifdef PFIL_HOOKS /* diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 77d86a5..2d7420f 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -488,10 +488,6 @@ ip6_input(m) dst6->sin6_len = sizeof(struct sockaddr_in6); dst6->sin6_family = AF_INET6; dst6->sin6_addr = ip6->ip6_dst; -#ifdef SCOPEDROUTING - ip6_forward_rt.ro_dst.sin6_scope_id = - in6_addr2scopeid(m->m_pkthdr.rcvif, &ip6->ip6_dst); -#endif rtalloc_ign((struct route *)&ip6_forward_rt, RTF_PRCLONING); } diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 0bb10d4..55eb3c3 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -530,11 +530,6 @@ skip_ipsec2:; dst->sin6_family = AF_INET6; dst->sin6_len = sizeof(struct sockaddr_in6); dst->sin6_addr = ip6->ip6_dst; -#ifdef SCOPEDROUTING - /* XXX: sin6_scope_id should already be fixed at this point */ - if (IN6_IS_SCOPE_LINKLOCAL(&dst->sin6_addr)) - dst->sin6_scope_id = ntohs(dst->sin6_addr.s6_addr16[1]); -#endif } #if defined(IPSEC) || defined(FAST_IPSEC) if (needipsec && needipsectun) { @@ -866,14 +861,12 @@ skip_ipsec2:; } else origifp = ifp; -#ifndef SCOPEDROUTING /* * clear embedded scope identifiers if necessary. * in6_clearscope will touch the addresses only when necessary. */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); -#endif /* * Check with the firewall... @@ -2534,14 +2527,12 @@ ip6_mloopback(ifp, m, dst) #endif ip6 = mtod(copym, struct ip6_hdr *); -#ifndef SCOPEDROUTING /* * clear embedded scope identifiers if necessary. * in6_clearscope will touch the addresses only when necessary. */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); -#endif (void)if_simloop(ifp, copym, dst->sin6_family, NULL); } diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 2c3ad2c..b876f8a 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -799,9 +799,6 @@ nd6_lookup(addr6, create, ifp) sin6.sin6_len = sizeof(struct sockaddr_in6); sin6.sin6_family = AF_INET6; sin6.sin6_addr = *addr6; -#ifdef SCOPEDROUTING - sin6.sin6_scope_id = in6_addr2scopeid(ifp, addr6); -#endif rt = rtalloc1((struct sockaddr *)&sin6, create, 0UL); if (rt) { if ((rt->rt_flags & RTF_LLINFO) == 0 && create) { |