Date: Sat, 9 May 2009 18:25:59 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r191942 - head/sys/netinet6 Message-ID: <200905091825.n49IPxab030861@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Sat May 9 18:25:58 2009 New Revision: 191942 URL: http://svn.freebsd.org/changeset/base/191942 Log: 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 Modified: head/sys/netinet6/ip6_output.c head/sys/netinet6/route6.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Sat May 9 18:09:18 2009 (r191941) +++ head/sys/netinet6/ip6_output.c Sat May 9 18:25:58 2009 (r191942) @@ -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 */ Modified: head/sys/netinet6/route6.c ============================================================================== --- head/sys/netinet6/route6.c Sat May 9 18:09:18 2009 (r191941) +++ head/sys/netinet6/route6.c Sat May 9 18:25:58 2009 (r191942) @@ -95,15 +95,6 @@ route6_input(struct mbuf **mp, int *offp * 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905091825.n49IPxab030861>