summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2005-08-10 17:30:10 +0000
committerume <ume@FreeBSD.org>2005-08-10 17:30:10 +0000
commitc9a2728833c21511e853b6ce133a7d3f3721aec3 (patch)
tree0ce91cb85734b4c0635d038523de458fd5242e69 /sys/netinet6
parenta70b60a0354b8f176a28fb286637a3ffb7082ce2 (diff)
downloadFreeBSD-src-c9a2728833c21511e853b6ce133a7d3f3721aec3.zip
FreeBSD-src-c9a2728833c21511e853b6ce133a7d3f3721aec3.tar.gz
removed RFC1885-related code. it was obsoleted by RFC2463, and the
code was #ifdef'ed out for a long time. Submitted by: suz Obtained from: KAME
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/icmp6.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 07ff5d5..7c177c4 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -136,10 +136,6 @@ static int ni6_store_addrs __P((struct icmp6_nodeinfo *, struct icmp6_nodeinfo *
struct ifnet *, int));
static int icmp6_notify_error __P((struct mbuf **, int, int, int));
-#ifdef COMPAT_RFC1885
-static struct route_in6 icmp6_reflect_rt;
-#endif
-
void
icmp6_init()
@@ -484,16 +480,10 @@ icmp6_input(mp, offp, proto)
case ICMP6_DST_UNREACH_ADDR:
code = PRC_HOSTDEAD;
break;
-#ifdef COMPAT_RFC1885
- case ICMP6_DST_UNREACH_NOTNEIGHBOR:
- code = PRC_UNREACH_SRCFAIL;
- break;
-#else
case ICMP6_DST_UNREACH_BEYONDSCOPE:
/* I mean "source address was incorrect." */
code = PRC_PARAMPROB;
break;
-#endif
case ICMP6_DST_UNREACH_NOPORT:
code = PRC_UNREACH_PORT;
break;
@@ -2030,10 +2020,6 @@ icmp6_reflect(m, off)
int type, code;
struct ifnet *outif = NULL;
struct in6_addr origdst, *src = NULL;
-#ifdef COMPAT_RFC1885
- int mtu = IPV6_MMTU;
- struct sockaddr_in6 *sin6 = &icmp6_reflect_rt.ro_dst;
-#endif
/* too short to reflect */
if (off < sizeof(struct ip6_hdr)) {
@@ -2087,40 +2073,6 @@ icmp6_reflect(m, off)
*/
ip6->ip6_dst = ip6->ip6_src;
-#ifdef COMPAT_RFC1885
- /*
- * xxx guess MTU
- * RFC 1885 requires that echo reply should be truncated if it
- * does not fit in with (return) path MTU, but the description was
- * removed in the new spec.
- */
- if (icmp6_reflect_rt.ro_rt == 0 ||
- ! (IN6_ARE_ADDR_EQUAL(&sin6->sin6_addr, &ip6->ip6_dst))) {
- if (icmp6_reflect_rt.ro_rt) {
- RTFREE(icmp6_reflect_rt.ro_rt);
- icmp6_reflect_rt.ro_rt = 0;
- }
- bzero(sin6, sizeof(*sin6));
- sin6->sin6_family = PF_INET6;
- sin6->sin6_len = sizeof(struct sockaddr_in6);
- sin6->sin6_addr = ip6->ip6_dst;
-
- rtalloc((struct route *)&icmp6_reflect_rt.ro_rt);
- }
-
- if (icmp6_reflect_rt.ro_rt == 0)
- goto bad;
-
- if ((icmp6_reflect_rt.ro_rt->rt_flags & RTF_HOST)
- && mtu < icmp6_reflect_rt.ro_rt->rt_ifp->if_mtu)
- mtu = icmp6_reflect_rt.ro_rt->rt_rmx.rmx_mtu;
-
- if (mtu < m->m_pkthdr.len) {
- plen -= (m->m_pkthdr.len - mtu);
- m_adj(m, mtu - m->m_pkthdr.len);
- }
-#endif
-
/*
* If the incoming packet was addressed directly to us (i.e. unicast),
* use dst as the src for the reply.
@@ -2204,11 +2156,7 @@ icmp6_reflect(m, off)
m->m_flags &= ~(M_BCAST|M_MCAST);
-#ifdef COMPAT_RFC1885
- ip6_output(m, NULL, &icmp6_reflect_rt, 0, NULL, &outif, NULL);
-#else
ip6_output(m, NULL, NULL, 0, NULL, &outif, NULL);
-#endif
if (outif)
icmp6_ifoutstat_inc(outif, type, code);
OpenPOWER on IntegriCloud