The ofpbuf_pull() removes the data from the head, not the tail. So it
removes the first added conjunction instead of the last.
This is not causing any issues with the current code as the way
expression normalization works we can't have more than one conjunction
in the vector. But still worth fixing for correctness, in case the
expression normalization logic ever changes.
Fixes: 9a4035402982 ("ofctrl: Optimize and specialize the
ofctrl_add_or_append_flow function.")
Signed-off-by: Ilya Maximets <[email protected]>
---
controller/ofctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/controller/ofctrl.c b/controller/ofctrl.c
index 4d53dd049..552a35ccf 100644
--- a/controller/ofctrl.c
+++ b/controller/ofctrl.c
@@ -1354,7 +1354,7 @@ create_conjunction_actions(const struct vector
*conjunctions,
conj->n_clauses = cls->n_clauses;
if (existing && ofpact_ref_find(existing, &conj->ofpact)) {
- ofpbuf_pull(ofpbuf, sizeof *conj);
+ ofpbuf->size -= sizeof *conj;
}
}
--
2.53.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev