'group_ports' never destroyed and re-created on each iteration.
CC: Manoj Sharma <[email protected]>
Fixes: edb240081518 ("Forwarding group to load balance l2 traffic with liveness
detection")
Signed-off-by: Ilya Maximets <[email protected]>
---
northd/ovn-northd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 1d41aacc6..474333e68 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -6138,6 +6138,7 @@ build_fwd_group_lflows(struct ovn_datapath *od, struct
hmap *lflows)
if (!(!od->nbs || !od->nbs->n_forwarding_groups)) {
struct ds match = DS_EMPTY_INITIALIZER;
struct ds actions = DS_EMPTY_INITIALIZER;
+ struct ds group_ports = DS_EMPTY_INITIALIZER;
for (int i = 0; i < od->nbs->n_forwarding_groups; ++i) {
const struct nbrec_forwarding_group *fwd_group = NULL;
@@ -6171,7 +6172,7 @@ build_fwd_group_lflows(struct ovn_datapath *od, struct
hmap *lflows)
ds_put_format(&match, "eth.dst == %s", fwd_group->vmac);
/* Create a comma separated string of child ports */
- struct ds group_ports = DS_EMPTY_INITIALIZER;
+ ds_clear(&group_ports);
if (fwd_group->liveness) {
ds_put_cstr(&group_ports, "liveness=\"true\",");
}
@@ -6192,6 +6193,7 @@ build_fwd_group_lflows(struct ovn_datapath *od, struct
hmap *lflows)
ds_destroy(&match);
ds_destroy(&actions);
+ ds_destroy(&group_ports);
}
}
--
2.25.4
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev