netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Phil Sutter <phil@nwl.cc>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [nf-next PATCH] netfilter: nf_tables: exthdr: Add support for existence check
Date: Mon, 6 Feb 2017 14:08:53 +0100	[thread overview]
Message-ID: <20170206130853.GA14826@salvia> (raw)
In-Reply-To: <20170117215126.13356-1-phil@nwl.cc>

On Tue, Jan 17, 2017 at 10:51:26PM +0100, Phil Sutter wrote:
> If NFT_EXTHDR_F_PRESENT is set, exthdr will not copy any header field
> data into *dest, but instead set it to 1 if the header is found and 0
> otherwise.

Applied this one, thanks Phil.

I have fixed this here, via sparse (make C=2):

net/netfilter/nft_exthdr.c:90:24: warning: cast to restricted __be32

> @@ -80,6 +87,7 @@ static int nft_exthdr_init(const struct nft_ctx *ctx,
>  	priv->offset = offset;
>  	priv->len    = len;
>  	priv->dreg   = nft_parse_register(tb[NFTA_EXTHDR_DREG]);
> +	priv->flags  = ntohl(nla_get_u32(tb[NFTA_EXTHDR_FLAGS]));

This needed to be nla_get_be32(). No problem, I fixed this here.

      reply	other threads:[~2017-02-06 13:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-17 21:51 [nf-next PATCH] netfilter: nf_tables: exthdr: Add support for existence check Phil Sutter
2017-02-06 13:08 ` Pablo Neira Ayuso [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=20170206130853.GA14826@salvia \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=phil@nwl.cc \
    /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).