netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Stephen Suryaputra <ssuryaextr@gmail.com>
Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH nf-next] netfilter: add support for matching IPv4 options
Date: Mon, 3 Jun 2019 14:30:06 +0200	[thread overview]
Message-ID: <20190603123006.urztqvxyxcm7w3av@salvia> (raw)
In-Reply-To: <20190601150429.GA16560@ubuntu>

On Sat, Jun 01, 2019 at 11:04:29AM -0400, Stephen Suryaputra wrote:
> On Sat, Jun 01, 2019 at 02:22:30AM +0200, Pablo Neira Ayuso wrote:
> > > It is the same as the IPv6 one. The offset returned is the offset to the
> > > specific option (target) or the byte beyond the options if the target
> > > isn't specified (< 0).
> > 
> > Thanks for explaining. So you are using ipv6_find_hdr() as reference,
> > but not sure this offset parameter is useful for this patchset since
> > this is always set to zero, do you have plans to use this in a follow
> > up patchset?
> 
> I developed this patchset to suit my employer needs and there is no plan
> for a follow up patchset, however I think non-zero offset might be useful
> in the future for tunneled packets.

For tunneled traffic, we can store the network offset in the
nft_pktinfo object. Then, add a new extension to update this network
offset to point to the network offset inside the tunnel header, and
use this pkt->network_offset everywhere.

I think this new IPv4 options extension should use priv->offset to
match fields inside the IPv4 option specifically, just like in the
IPv6 extensions and TCP options do. If you look on how the
priv->offset is used in the existing code, this offset points to
values that the specific option field conveys.

Thanks.

  reply	other threads:[~2019-06-03 12:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23  9:38 [PATCH nf-next] netfilter: add support for matching IPv4 options Stephen Suryaputra
2019-05-31 17:11 ` Pablo Neira Ayuso
2019-05-31 19:35   ` Stephen Suryaputra
2019-06-01  0:22     ` Pablo Neira Ayuso
2019-06-01  8:27       ` Florian Westphal
2019-06-01  8:40         ` Pablo Neira Ayuso
2019-06-01  8:53           ` Florian Westphal
2019-06-01 15:04       ` Stephen Suryaputra
2019-06-03 12:30         ` Pablo Neira Ayuso [this message]
2019-06-02  2:27           ` Stephen Suryaputra
2019-06-10 15:50             ` 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=20190603123006.urztqvxyxcm7w3av@salvia \
    --to=pablo@netfilter.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=ssuryaextr@gmail.com \
    /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).