net: vrf: Fix NAT within a VRF
authorDavid Ahern <dsa@cumulusnetworks.com>
Wed, 14 Dec 2016 19:06:18 +0000 (11:06 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Dec 2016 15:45:57 +0000 (10:45 -0500)
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>
drivers/net/vrf.c

index 3bca24651dc0a1c5121348a21d7431d8384d2024..015a1321c7dd58ff195db7c69a89952f5abaea81 100644 (file)
@@ -849,8 +849,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 */