netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, Florian Westphal <fw@strlen.de>
Subject: nft: ah expression doesn't work for IPv6
Date: Thu, 2 Mar 2017 20:56:52 +0100	[thread overview]
Message-ID: <20170302195651.GX6099@orbyte.nwl.cc> (raw)

Hi,

There is currently an open issue with nft in that ah expression doesn't
work for IPv6 since it creates a payload expression which doesn't find
the AH IPv6 extension header.

There has been a discussion about this problem off-list in which two
alternative "solutions" were named, both involve checking the context
to find out whether one is trying to match an IPv4 or IPv6 packet and
then create either payload or exthdr expression. Though this solution is
not optimal, as in (at least) inet table the address family is not given
per se.

I had the idea of creating a "real" solution to the problem which
consists of a payload/exthdr hybrid in kernel space searching for the
given header in different locations depending on the family of the
actual package being handled. Ideally this should reuse as much code as
possible, so maybe "just" create both expressions in user space and in
kernel space only branch between the two.

This is merely a rough idea and I probably miss some obstacles which
have to be overcome in order to make this work. What are your opinions
on that? Do you think something like that could work, or do you have a
better idea to fix this problem?

Thanks, Phil

             reply	other threads:[~2017-03-02 20:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02 19:56 Phil Sutter [this message]
2017-03-02 21:01 ` nft: ah expression doesn't work for IPv6 Pablo Neira Ayuso
2017-03-02 21:25   ` Pablo Neira Ayuso
2017-03-03 14:01     ` Phil Sutter
2017-03-03 17:37       ` Pablo Neira Ayuso

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=20170302195651.GX6099@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).