]> git.karo-electronics.de Git - karo-tx-linux.git/commit
openvswitch: Fix cached ct with helper.
authorJoe Stringer <joe@ovn.org>
Wed, 11 May 2016 17:29:26 +0000 (10:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 May 2016 19:14:56 +0000 (15:14 -0400)
commit16ec3d4fbb967bd0e1c8d9dce9ef70e915a86615
tree1ff4a7f34f35711958bbb8ea1840b56944df97ec
parent6e14313f01f02f324d5dd68a49d34ec1e4bb569e
openvswitch: Fix cached ct with helper.

When using conntrack helpers from OVS, a common configuration is to
perform a lookup without specifying a helper, then go through a
firewalling policy, only to decide to attach a helper afterwards.

In this case, the initial lookup will cause a ct entry to be attached to
the skb, then the later commit with helper should attach the helper and
confirm the connection. However, the helper attachment has been missing.
If the user has enabled automatic helper attachment, then this issue
will be masked as it will be applied in init_conntrack(). It is also
masked if the action is executed from ovs_packet_cmd_execute() as that
will construct a fresh skb.

This patch fixes the issue by making an explicit call to try to assign
the helper if there is a discrepancy between the action's helper and the
current skb->nfct.

Fixes: cae3a2627520 ("openvswitch: Allow attaching helpers to ct action")
Signed-off-by: Joe Stringer <joe@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/conntrack.c