]> git.baikalelectronics.ru Git - kernel.git/commit
openvswitch: Find existing conntrack entry after upcall.
authorJarno Rajahalme <jarno@ovn.org>
Thu, 10 Mar 2016 18:54:20 +0000 (10:54 -0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 14 Mar 2016 22:47:28 +0000 (23:47 +0100)
commit820964da45787307234aa4c81fa8bbd9214731bf
tree7b1f0a85832935af7e98cdac7227632be2a67729
parentb586bc7e1272b37072ae629007ad437702cb3e51
openvswitch: Find existing conntrack entry after upcall.

Add a new function ovs_ct_find_existing() to find an existing
conntrack entry for which this packet was already applied to.  This is
only to be called when there is evidence that the packet was already
tracked and committed, but we lost the ct reference due to an
userspace upcall.

ovs_ct_find_existing() is called from skb_nfct_cached(), which can now
hide the fact that the ct reference may have been lost due to an
upcall.  This allows ovs_ct_commit() to be simplified.

This patch is needed by later "openvswitch: Interface with NAT" patch,
as we need to be able to pass the packet through NAT using the
original ct reference also after the reference is lost after an
upcall.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/openvswitch/conntrack.c