[ovs-discuss] Deleting Flows that reference a deleted Group
gavin_remaley at selinc.com
gavin_remaley at selinc.com
Tue Sep 1 19:35:29 UTC 2015
When I delete a Group, I do not see Flows being deleted that reference the
deleted Group via Write Actions. Per the OF Spec, this seems like it
should be happening.
It appears that the search is performed but perhaps it does not properly
delve into Write Actions instructions?
The patch below seems to have fixed it, but I am not sure if this is the
appropriate thing to do. Am I missing something or does this appear to be
a real problem?
diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
index ea47ff9..811020d 100644
--- a/lib/ofp-actions.c
+++ b/lib/ofp-actions.c
@@ -3183,9 +3183,28 @@ ofpacts_output_to_group(const struct ofpact
*ofpacts, size_t ofpacts_len,
const struct ofpact *a;
OFPACT_FOR_EACH (a, ofpacts, ofpacts_len) {
- if (a->type == OFPACT_GROUP
- && ofpact_get_GROUP(a)->group_id == group_id) {
- return true;
+ if (a->type == OFPACT_GROUP) {
+
+ if (ofpact_get_GROUP(a)->group_id == group_id) {
+ return true;
+ }
+ }
+ else if (a->type == OFPACT_WRITE_ACTIONS)
+ {
+ /* Get the nested actions */
+ const struct ofpact_nest *nested_actions =
ofpact_get_WRITE_ACTIONS(a);
+ struct ofpact const *nested;
+
+ /* Loop through all the nested actions (Write Actions) */
+ OFPACT_FOR_EACH (nested,
+ nested_actions->actions,
+ ofpact_nest_get_action_len(nested_actions))
{
+ if (nested->type == OFPACT_GROUP &&
+ ofpact_get_GROUP(nested)->group_id == group_id) {
+ return true;
+ }
+
+ }
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20150901/576193a6/attachment-0002.html>
More information about the discuss
mailing list