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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -395,7 +395,9 @@ struct ovs_key_nd { · 394 unmodified lines | ||
| 395 | 395 | * @OVS_FLOW_ATTR_ACTIONS: Nested %OVS_ACTION_ATTR_* attributes specifying |
| 396 | 396 | * the actions to take for packets that match the key. Always present in |
| 397 | 397 | * notifications. Required for %OVS_FLOW_CMD_NEW requests, optional for |
| 398 | − * %OVS_FLOW_CMD_SET requests. | |
| 398 | + * %OVS_FLOW_CMD_SET requests. An %OVS_FLOW_CMD_SET without | |
| 399 | + * %OVS_FLOW_ATTR_ACTIONS will not modify the actions. To clear the actions, | |
| 400 | + * an %OVS_FLOW_ATTR_ACTIONS without any nested attributes must be given. | |
| 399 | 401 | * @OVS_FLOW_ATTR_STATS: &struct ovs_flow_stats giving statistics for this |
| 400 | 402 | * flow. Present in notifications if the stats would be nonzero. Ignored in |
| 401 | 403 | * requests. |