diff options
author | imp <imp@FreeBSD.org> | 2009-05-09 18:25:58 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2009-05-09 18:25:58 +0000 |
commit | 68deec0b3f4d8c45b9c9a38a1f8d3d5d09b7e23b (patch) | |
tree | d20aec174ea082372dfb34650a584a22152479c8 /sys/netinet6 | |
parent | 0477b14e3f0a5125aa0917580da770a406b08653 (diff) | |
download | FreeBSD-src-68deec0b3f4d8c45b9c9a38a1f8d3d5d09b7e23b.zip FreeBSD-src-68deec0b3f4d8c45b9c9a38a1f8d3d5d09b7e23b.tar.gz |
Implement RFC 5095 more fully. Rather than marking this no-op code as
BURN_BRIDGES, just remove it. Adjust comments.
Reviewed by: dwhite, emaste, battlez
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ip6_output.c | 29 | ||||
-rw-r--r-- | sys/netinet6/route6.c | 9 |
2 files changed, 3 insertions, 35 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 61804ec..8f2e632c 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -435,34 +435,11 @@ skip_ipsec2:; #endif /* IPSEC */ /* - * If there is a routing header, replace the destination address field - * with the first hop of the routing header. + * If there is a routing header, discard the packet. */ if (exthdrs.ip6e_rthdr) { - struct ip6_rthdr *rh = - (struct ip6_rthdr *)(mtod(exthdrs.ip6e_rthdr, - struct ip6_rthdr *)); - - /* - * While this switch may look gratuitous, leave it in - * in favour of RH2 implementations, etc. - */ - switch (rh->ip6r_type) { -#ifndef BURN_BRIDGES - case IPV6_RTHDR_TYPE_0: - /* - * According to RFC 5095 we should not implement - * it in any way but we may want to give the user - * a hint for now. - */ - log(LOG_INFO, "[%s:%d] IPv6 Type 0 Routing Headers are " - "deprecated.\n", __func__, __LINE__); - /* FALLTHROUGH */ -#endif - default: /* is it possible? */ - error = EINVAL; - goto bad; - } + error = EINVAL; + goto bad; } /* Source address validation */ diff --git a/sys/netinet6/route6.c b/sys/netinet6/route6.c index 9bf4f3b..64f057e 100644 --- a/sys/netinet6/route6.c +++ b/sys/netinet6/route6.c @@ -95,15 +95,6 @@ route6_input(struct mbuf **mp, int *offp, int proto) * in favour of RH2 implementations, etc. */ switch (rh->ip6r_type) { -#ifndef BURN_BRIDGES - case IPV6_RTHDR_TYPE_0: - /* - * According to RFC 5095, 3. Deprecation of RH0, - * we must handle RH0 like the default (unknown - * routing header type) case. - */ - /* FALLTHROUGH */ -#endif default: /* Unknown routing header type. */ if (rh->ip6r_segleft == 0) { |