Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1237736

[PATCHv2 4/7] openvswitch: Ensure flow is valid before executing ct

From Joe Stringer <joestringer@nicira.com>
Newsgroups linux.kernel
Subject [PATCHv2 4/7] openvswitch: Ensure flow is valid before executing ct
Date 2015-10-01 23:00 +0200
Message-ID <qeT7m-7th-39@gated-at.bofh.it> (permalink)
References <qeT7k-7th-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The ct action uses parts of the flow key, so we need to ensure that it
is valid before executing that action.

Fixes: 7f8a436 "openvswitch: Add conntrack action"
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
---
v2: Acked.
---
 net/openvswitch/actions.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index 4cb93f9..c6a39bf 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,
 			break;
 
 		case OVS_ACTION_ATTR_CT:
+			if (!is_flow_key_valid(key)) {
+				err = ovs_flow_key_update(skb, key);
+				if (err)
+					return err;
+			}
+
 			err = ovs_ct_execute(ovs_dp_get_net(dp), skb, key,
 					     nla_data(a));
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCHv2 0/7] OVS conntrack fixes for net Joe Stringer <joestringer@nicira.com> - 2015-10-01 23:00 +0200
  [PATCHv2 7/7] openvswitch: Change CT_ATTR_FLAGS to CT_ATTR_COMMIT Joe Stringer <joestringer@nicira.com> - 2015-10-01 23:00 +0200
    Re: [PATCHv2 7/7] openvswitch: Change CT_ATTR_FLAGS to CT_ATTR_COMMIT Pravin Shelar <pshelar@nicira.com> - 2015-10-02 00:30 +0200
  [PATCHv2 4/7] openvswitch: Ensure flow is valid before executing ct Joe Stringer <joestringer@nicira.com> - 2015-10-01 23:00 +0200

csiph-web