Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Andreas Herz <andi@geekosphere.org>
To: netfilter@vger.kernel.org
Subject: Re: IPv6 fragmentation next header missing in some cases in the skb
Date: Tue, 1 Sep 2015 13:11:18 +0200	[thread overview]
Message-ID: <20150901111118.GK29140@kvmbude> (raw)
In-Reply-To: <20150831143322.GA29140@kvmbude>

On 31/08/15 at 16:33, Andreas Herz wrote:
> On 31/08/15 at 14:03, Andreas Herz wrote:
> > While playing around with the IPv6 extension headers i found a strange
> > behaviour when it comes to the IPv6 fragmentation header. First i used the
> > thc-ipv6 toolkit with that i could trigger the issue below in the first place.
> >
> > [...]
> >
> > Does anyone have an idea why this happens and where i might need to look for
> > this issue?
> 
> Florian Westphal pointed out that it might be conntrack defrag and yes,
> on systems without it i see the frag header in iptables.
> So if defrag is on i have no chance to filter specific fragmentations i
> guess and just hope that the defrag process sorts every messed up stuff
> out ;)

To be more precise it only defrags valid fragmentation. When i used
thc-ipv6 implementation6 test i get:

> ip6tables -t raw -I PREROUTING -j LOG -m ipv6header --soft --header frag

Test 11: correct fragmentation          PASSED - we got a reply
Test 12: one-shot fragmentation         PASSED - we got a reply

=> won't match the rule, they are done in conntrack defrag

Test 13: overlap-first-zero fragmentation   FAILED - no reply
Test 14: overlap-last-zero fragmentation    FAILED - no reply
Test 15: overlap-first-dst fragmentation    FAILED - no reply
Test 16: overlap-last-dst fragmentation     FAILED - no reply

=> match the rule and they pass the conntrack defrag

So is my assumption correct that it would be fine to filter all traffic
with header frag set when i use conntrack_defrag_ipv6 at the same time?

-- 
Andreas Herz

      reply	other threads:[~2015-09-01 11:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31 12:03 IPv6 fragmentation next header missing in some cases in the skb Andreas Herz
2015-08-31 14:33 ` Andreas Herz
2015-09-01 11:11   ` Andreas Herz [this message]

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=20150901111118.GK29140@kvmbude \
    --to=andi@geekosphere.org \
    --cc=netfilter@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