netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org
Subject: [PATCH 3/7] netfilter: Drop fragmented ndisc packets assembled in netfilter
Date: Thu, 22 Oct 2020 19:29:21 +0200	[thread overview]
Message-ID: <20201022172925.22770-4-pablo@netfilter.org> (raw)
In-Reply-To: <20201022172925.22770-1-pablo@netfilter.org>

From: Georg Kohmann <geokohma@cisco.com>

Fragmented ndisc packets assembled in netfilter not dropped as specified
in RFC 6980, section 5. This behaviour breaks TAHI IPv6 Core Conformance
Tests v6LC.2.1.22/23, V6LC.2.2.26/27 and V6LC.2.3.18.

Setting IP6SKB_FRAGMENTED flag during reassembly.

References: commit b800c3b966bc ("ipv6: drop fragmented ndisc packets by default (RFC 6980)")
Signed-off-by: Georg Kohmann <geokohma@cisco.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/ipv6/netfilter/nf_conntrack_reasm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index fed9666a2f7d..054d287eb13d 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -355,6 +355,7 @@ static int nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *skb,
 	ipv6_hdr(skb)->payload_len = htons(payload_len);
 	ipv6_change_dsfield(ipv6_hdr(skb), 0xff, ecn);
 	IP6CB(skb)->frag_max_size = sizeof(struct ipv6hdr) + fq->q.max_size;
+	IP6CB(skb)->flags |= IP6SKB_FRAGMENTED;
 
 	/* Yes, and fold redundant checksum back. 8) */
 	if (skb->ip_summed == CHECKSUM_COMPLETE)
-- 
2.20.1


  parent reply	other threads:[~2020-10-22 17:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 17:29 [PATCH 0/7] Netfilter fixes for net Pablo Neira Ayuso
2020-10-22 17:29 ` [PATCH 1/7] ipvs: adjust the debug info in function set_tcp_state Pablo Neira Ayuso
2020-10-22 19:20   ` patchwork-bot+netdevbpf
2020-10-22 17:29 ` [PATCH 2/7] netfilter: conntrack: connection timeout after re-register Pablo Neira Ayuso
2020-10-22 17:29 ` Pablo Neira Ayuso [this message]
2020-10-22 17:29 ` [PATCH 4/7] netfilter: ebtables: Fixes dropping of small packets in bridge nat Pablo Neira Ayuso
2020-10-22 17:29 ` [PATCH 5/7] docs: nf_flowtable: fix typo Pablo Neira Ayuso
2020-10-22 17:29 ` [PATCH 6/7] netfilter: nftables_offload: KASAN slab-out-of-bounds Read in nft_flow_rule_create Pablo Neira Ayuso
2020-10-22 17:29 ` [PATCH 7/7] netfilter: nf_fwd_netdev: clear timestamp in forwarding path Pablo Neira Ayuso
2020-10-22 19:16 ` [PATCH 0/7] Netfilter fixes for net Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201022172925.22770-4-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).