summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2014-03-24 17:34:48 -0700
committerJarno Rajahalme <jrajahalme@nicira.com>2014-03-24 17:34:48 -0700
commit90b8c2f7c08eab4aea41601e57d4eee021ef5561 (patch)
tree3959414a304d7af5e41b25ecdeaed854ab78ef6c /include/linux
parent87968f01fc8404b98f0bb98aac0f73b743b79b5c (diff)
downloadopenvswitch-90b8c2f7c08eab4aea41601e57d4eee021ef5561.tar.gz
datapath: Avoid assigning a NULL pointer to flow actions.
Flow SET can accept an empty set of actions, with the intended semantics of leaving existing actions unmodified. This seems to have been brokin after OVS 1.7, as we have assigned the flow's actions pointer to NULL in this case, but we never check for the NULL pointer later on. This patch restores the intended behavior and documents it in the include/linux/openvswitch.h. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/openvswitch.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h
index d1ff5ec7b..e39e4377b 100644
--- a/include/linux/openvswitch.h
+++ b/include/linux/openvswitch.h
@@ -426,7 +426,9 @@ struct ovs_key_nd {
* @OVS_FLOW_ATTR_ACTIONS: Nested %OVS_ACTION_ATTR_* attributes specifying
* the actions to take for packets that match the key. Always present in
* notifications. Required for %OVS_FLOW_CMD_NEW requests, optional for
- * %OVS_FLOW_CMD_SET requests.
+ * %OVS_FLOW_CMD_SET requests. An %OVS_FLOW_CMD_SET without
+ * %OVS_FLOW_ATTR_ACTIONS will not modify the actions. To clear the actions,
+ * an %OVS_FLOW_ATTR_ACTIONS without any nested attributes must be given.
* @OVS_FLOW_ATTR_STATS: &struct ovs_flow_stats giving statistics for this
* flow. Present in notifications if the stats would be nonzero. Ignored in
* requests.