From: Pablo Neira Ayuso Subject: Re: IPv6 Parameter problem with no ICMPv6 response ? Date: Mon, 5 Feb 2018 13:16:08 +0100 Message-ID: <20180205121608.cxd4l5j5vr2tpe46@salvia> References: <20180205035826.GA2558@spottygum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netfilter-devel@vger.kernel.org To: David McCullough Return-path: Received: from mail.us.es ([193.147.175.20]:33090 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753039AbeBEMQO (ORCPT ); Mon, 5 Feb 2018 07:16:14 -0500 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 277B0210564 for ; Mon, 5 Feb 2018 13:16:12 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 150BEDA7E0 for ; Mon, 5 Feb 2018 13:16:12 +0100 (CET) Content-Disposition: inline In-Reply-To: <20180205035826.GA2558@spottygum.com> Sender: netfilter-devel-owner@vger.kernel.org List-ID: On Mon, Feb 05, 2018 at 01:58:26PM +1000, David McCullough wrote: > > Hi devel, > > I am looking for some feedback on IPv6 behaviour with/without netfilter in > the path. We are in process of some IPv6 certification at a lab. > > RFC2460 has a bunch of conditions under which certain ICMPv6 responses > should be sent. This is even commented in the code. > > linux/net/ipv6/reassembly.c:255 > /* Check if the fragment is rounded to 8 bytes. > * Required by the RFC. > */ > if (end & 0x7) { > /* RFC2460 says always send parameter problem in > * this case. -DaveM > */ > __IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), > IPSTATS_MIB_INHDRERRORS); > icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, > offsetof(struct ipv6hdr, payload_len)); > return -1; > } > > linux/net/ipv6/netfilter/nf_conntrack_reasm.c:259 > /* Check if the fragment is rounded to 8 bytes. > * Required by the RFC. > */ > if (end & 0x7) { > /* RFC2460 says always send parameter problem in > * this case. -DaveM > */ > pr_debug("end of fragment not rounded to 8 bytes.\n"); > return -1; > } > > The behaviour of the non-netfilter code is what the certification is expecting. > We are using conntracking though and I can see no way to avoid the above > netfilter code from silently dropping the packet and not responding correctly. > > We experiemented with the patch below and it provided the appropriate > responses but we were not sure this is the best approach. Happy to send in > a proper patch if this looks ok. Probably you're refering to this fix? commit 83f1999caeb14e15df205e80d210699951733287 Author: Subash Abhinov Kasiviswanathan Date: Fri Jan 12 17:36:27 2018 -0700 netfilter: ipv6: nf_defrag: Pass on packets to stack per RFC2460