Module Name: src Committed By: maxv Date: Wed Jan 31 15:23:08 UTC 2018
Modified Files: src/sys/netinet6: ip6_output.c Log Message: Correct the check; we want to find IPPROTO_HOPOPTS, not IPV6_HOPOPTS. This just couldn't work. By the way, I'm wondering what is the point of this block. Calling ip6_hopopts_input() won't achieve anything useful, and it could actually be a problem, because there are several paths in it that call icmp6_error, which calls ip6_output, and then we're back in the same function. Besides it is possible to reach icmp6_error with a packet we emitted (as opposed to a packet we are forwarding), and in that case we are sending an ICMP error back to ourselves. To generate a diff of this commit: cvs rdiff -u -r1.199 -r1.200 src/sys/netinet6/ip6_output.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet6/ip6_output.c diff -u src/sys/netinet6/ip6_output.c:1.199 src/sys/netinet6/ip6_output.c:1.200 --- src/sys/netinet6/ip6_output.c:1.199 Wed Jan 31 14:16:28 2018 +++ src/sys/netinet6/ip6_output.c Wed Jan 31 15:23:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_output.c,v 1.199 2018/01/31 14:16:28 maxv Exp $ */ +/* $NetBSD: ip6_output.c,v 1.200 2018/01/31 15:23:08 maxv Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.199 2018/01/31 14:16:28 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.200 2018/01/31 15:23:08 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -762,8 +762,10 @@ ip6_output( * If the outgoing packet contains a hop-by-hop options header, * it must be examined and processed even by the source node. * (RFC 2460, section 4.) + * + * XXX Is this really necessary? */ - if (ip6->ip6_nxt == IPV6_HOPOPTS) { + if (ip6->ip6_nxt == IPPROTO_HOPOPTS) { u_int32_t dummy1; /* XXX unused */ u_int32_t dummy2; /* XXX unused */ int hoff = sizeof(struct ip6_hdr);