From owner-svn-src-all@FreeBSD.ORG Sat May 9 18:25:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 719E7106568F; Sat, 9 May 2009 18:25:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44EA18FC18; Sat, 9 May 2009 18:25:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n49IPx1v030863; Sat, 9 May 2009 18:25:59 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n49IPxab030861; Sat, 9 May 2009 18:25:59 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200905091825.n49IPxab030861@svn.freebsd.org> From: Warner Losh Date: Sat, 9 May 2009 18:25:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191942 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2009 18:26:00 -0000 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) {