According to the RFC 2460 and RFC 5095, ICMP Parameter Problem, Code 0 should be sent, not Code 2. OK?
(while at the spot, kill a trailing whitespace) diff --git sys/netinet6/ip6_input.c sys/netinet6/ip6_input.c index 6afde60..e554ad7 100644 --- sys/netinet6/ip6_input.c +++ sys/netinet6/ip6_input.c @@ -328,12 +328,12 @@ ip6_input(struct mbuf *m) ip6stat.ip6s_badoptions++; in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_discard); in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_hdrerr); - icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_OPTION, 0); + icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, 0); /* m is already freed */ return; } -#if NPF > 0 +#if NPF > 0 /* * Packet filter */