diff options
author | Joe Stringer <joestringer@nicira.com> | 2015-10-06 13:59:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-07 08:03:05 -0400 |
commit | ec0d043d05e6e3c0c2fac5de922c800c027c6386 (patch) | |
tree | 2d0f9a53ee81f172ea53061e7b68a51dbe98f1d2 | |
parent | b8f2257069f179c7bdedc9501c1623070c4c37bb (diff) |
openvswitch: Ensure flow is valid before executing ct
The ct action uses parts of the flow key, so we need to ensure that it
is valid before executing that action.
Fixes: 7f8a436eaa2c "openvswitch: Add conntrack action"
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/openvswitch/actions.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 4cb93f92d6be..c6a39bf2c3b9 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c | |||
@@ -1102,6 +1102,12 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb, | |||
1102 | break; | 1102 | break; |
1103 | 1103 | ||
1104 | case OVS_ACTION_ATTR_CT: | 1104 | case OVS_ACTION_ATTR_CT: |
1105 | if (!is_flow_key_valid(key)) { | ||
1106 | err = ovs_flow_key_update(skb, key); | ||
1107 | if (err) | ||
1108 | return err; | ||
1109 | } | ||
1110 | |||
1105 | err = ovs_ct_execute(ovs_dp_get_net(dp), skb, key, | 1111 | err = ovs_ct_execute(ovs_dp_get_net(dp), skb, key, |
1106 | nla_data(a)); | 1112 | nla_data(a)); |
1107 | 1113 | ||