netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH v2] netfilter: payload mangling
Date: Tue, 24 Nov 2015 10:00:21 +0000	[thread overview]
Message-ID: <1448359222-5509-1-git-send-email-kaber@trash.net> (raw)

Following is the latest version of the payload mangling patch. Changes
to the last version are:

* Make checksum updates optional, required for some protocols

* Fix mangling headers before skb->data. Previously skb_make_writable() would
  fail due to negative lengths.

* Add new struct for set operation to avoid bloating the regular payload struct

The patch has been tested with headers on all header bases.

The last remaining question is how to react to failure. For data loading
expressions we simply NFT_BREAK, which is reasonable since they're used in
match like constructs.

For statements that are actions on the packet, I'd say we should drop the
packet if the action fails. However we don't do this so far anywhere else,
so I wanted to bring it up first since it might also be relevant for other
actions, "ct" comes to mind.


Patrick McHardy (1):
  netfilter: nft_payload: add packet mangling support

 include/net/netfilter/nf_tables_core.h   |   9 +++
 include/uapi/linux/netfilter/nf_tables.h |  17 ++++
 net/netfilter/nft_payload.c              | 135 +++++++++++++++++++++++++++++--
 3 files changed, 155 insertions(+), 6 deletions(-)

-- 
2.5.0


             reply	other threads:[~2015-11-24 10:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 10:00 Patrick McHardy [this message]
2015-11-24 10:00 ` [PATCH v2] netfilter: nft_payload: add packet mangling support Patrick McHardy
2015-11-25 12:53   ` 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=1448359222-5509-1-git-send-email-kaber@trash.net \
    --to=kaber@trash.net \
    --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).