blob: 42ba1da065ac8724cebba7d38a46a9d6f0b13406 [file]
From 77a68e668aa356ccf9a45e0cb9c69aa5c3ede3ec Mon Sep 17 00:00:00 2001
From: David Ahern <dsa@cumulusnetworks.com>
Date: Wed, 14 Dec 2016 11:06:18 -0800
Subject: [PATCH] net: vrf: Fix NAT within a VRF
commit a0f37efa82253994b99623dbf41eea8dd0ba169b upstream.
Connection tracking with VRF is broken because the pass through the VRF
device drops the connection tracking info. Removing the call to nf_reset
allows DNAT and MASQUERADE to work across interfaces within a VRF.
Fixes: 73e20b761acf ("net: vrf: Add support for PREROUTING rules on vrf device")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 1ce7420322ee..292e0ee15946 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -790,8 +790,6 @@ static struct sk_buff *vrf_rcv_nfhook(u8 pf, unsigned int hook,
{
struct net *net = dev_net(dev);
- nf_reset(skb);
-
if (NF_HOOK(pf, hook, net, NULL, skb, dev, NULL, vrf_rcv_finish) < 0)
skb = NULL; /* kfree_skb(skb) handled by nf code */
--
2.10.1