netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nf_nat_packet: Clear skb hash after modifying packet headers.
@ 2016-04-20 21:31 Jarno Rajahalme
  2016-04-29  9:09 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 5+ messages in thread
From: Jarno Rajahalme @ 2016-04-20 21:31 UTC (permalink / raw)
  To: netfilter-devel; +Cc: kernel-janitors, dev, jarno

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;
 }
 EXPORT_SYMBOL_GPL(nf_nat_packet);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-30  7:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).