From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jarno Rajahalme <jarno@ovn.org>
Cc: netfilter-devel@vger.kernel.org, kernel-janitors@vger.kernel.org,
dev@openvswitch.org, fw@strlen.de
Subject: Re: [PATCH] nf_nat_packet: Clear skb hash after modifying packet headers.
Date: Fri, 29 Apr 2016 11:09:59 +0200 [thread overview]
Message-ID: <20160429090959.GA7236@salvia> (raw)
In-Reply-To: <1461187870-54322-1-git-send-email-jarno@ovn.org>
On Wed, Apr 20, 2016 at 02:31:10PM -0700, Jarno Rajahalme wrote:
> Clear the skb hash when it does not reflect the actual header values
> any more.
>
> Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
> ---
> net/netfilter/nf_nat_core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c
> index 06a9f45..3c2302f 100644
> --- a/net/netfilter/nf_nat_core.c
> +++ b/net/netfilter/nf_nat_core.c
> @@ -505,6 +505,7 @@ unsigned int nf_nat_packet(struct nf_conn *ct,
> if (!l3proto->manip_pkt(skb, 0, l4proto, &target, mtype))
> return NF_DROP;
> }
> + skb_clear_hash(skb);
> return NF_ACCEPT;
> }
Cc'ing Florian.
This seems to affect the new tracing infrastructure for nf_tables:
31 static int trace_fill_id(struct sk_buff *nlskb, struct sk_buff
*skb)
32 {
33 __be32 id;
34
35 /* using skb address as ID results in a limited number of
36 * values (and quick reuse).
37 *
38 * So we attempt to use as many skb members that will not
39 * change while skb is with netfilter.
40 */
41 id = (__be32)jhash_2words(hash32_ptr(skb), skb_get_hash(skb),
42 skb->skb_iif);
43
44 return nla_put_be32(nlskb, NFTA_TRACE_ID, id);
45 }
next prev parent reply other threads:[~2016-04-29 9:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-20 21:31 [PATCH] nf_nat_packet: Clear skb hash after modifying packet headers Jarno Rajahalme
2016-04-29 9:09 ` Pablo Neira Ayuso [this message]
2016-04-29 9:12 ` Florian Westphal
[not found] ` <20160429091212.GL17538-E0PNVn5OA6ohrxcnuTQ+TQ@public.gmane.org>
2016-04-29 18:04 ` Jarno Rajahalme
2016-04-30 7:57 ` Florian Westphal
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=20160429090959.GA7236@salvia \
--to=pablo@netfilter.org \
--cc=dev@openvswitch.org \
--cc=fw@strlen.de \
--cc=jarno@ovn.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).