From: David Ahern Date: Wed, 14 Dec 2016 19:06:18 +0000 (-0800) Subject: net: vrf: Fix NAT within a VRF X-Git-Tag: C0P2-H0.0--20200415~10754 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=d4a0b2e40c46898a307e37a857f623c3d884b1fe;p=linux.git net: vrf: Fix NAT within a VRF [ Upstream commit a0f37efa82253994b99623dbf41eea8dd0ba169b ] 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index 820de6a9ddde..5b995c43bff1 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -850,8 +850,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 */