openvswitch: support asymmetric conntrack
authorAaron Conole <aconole@redhat.com>
Tue, 3 Dec 2019 21:34:13 +0000 (16:34 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Dec 2019 00:31:15 +0000 (16:31 -0800)
commit5d50aa83e2c8e91ced2cca77c198b468ca9210f4
tree1a6425bbfb8a9175b68b9239149b73ec0bb3b6cb
parent7b3b209e61adf575faf21d08a47f6a842b7b0767
openvswitch: support asymmetric conntrack

The openvswitch module shares a common conntrack and NAT infrastructure
exposed via netfilter.  It's possible that a packet needs both SNAT and
DNAT manipulation, due to e.g. tuple collision.  Netfilter can support
this because it runs through the NAT table twice - once on ingress and
again after egress.  The openvswitch module doesn't have such capability.

Like netfilter hook infrastructure, we should run through NAT twice to
keep the symmetry.

Fixes: 05752523e565 ("openvswitch: Interface with NAT.")
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/conntrack.c