|
|
ebb439 |
From b8a33e87955d39b7e354fad6b8317bdcd9568c02 Mon Sep 17 00:00:00 2001
|
|
|
ebb439 |
From: Ilya Maximets <i.maximets@ovn.org>
|
|
|
ebb439 |
Date: Fri, 20 Nov 2020 01:17:11 +0100
|
|
|
ebb439 |
Subject: [PATCH 03/16] northd: Fix leaks of strings while formatting ecmp
|
|
|
ebb439 |
flows.
|
|
|
ebb439 |
|
|
|
ebb439 |
Result of 'normalize_v46_prefix()' should be freed and all dynamic
|
|
|
ebb439 |
strings should be destroyed.
|
|
|
ebb439 |
|
|
|
ebb439 |
Fixes: 4fdca656857d ("Add ECMP symmetric replies.")
|
|
|
ebb439 |
Acked-by: Dumitru Ceara <dceara@redhat.com>
|
|
|
ebb439 |
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
|
|
|
ebb439 |
Signed-off-by: Numan Siddique <numans@ovn.org>
|
|
|
ebb439 |
---
|
|
|
ebb439 |
northd/ovn-northd.c | 5 +++++
|
|
|
ebb439 |
1 file changed, 5 insertions(+)
|
|
|
ebb439 |
|
|
|
ebb439 |
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
|
|
|
ebb439 |
index 3884e08eb..0acff2322 100644
|
|
|
ebb439 |
--- a/northd/ovn-northd.c
|
|
|
ebb439 |
+++ b/northd/ovn-northd.c
|
|
|
ebb439 |
@@ -7800,6 +7800,7 @@ add_ecmp_symmetric_reply_flows(struct hmap *lflows,
|
|
|
ebb439 |
route->prefix.family == AF_INET ? "4" : "6",
|
|
|
ebb439 |
route->is_src_route ? "dst" : "src",
|
|
|
ebb439 |
cidr);
|
|
|
ebb439 |
+ free(cidr);
|
|
|
ebb439 |
ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_DEFRAG, 100,
|
|
|
ebb439 |
ds_cstr(&match), "ct_next;",
|
|
|
ebb439 |
&st_route->header_);
|
|
|
ebb439 |
@@ -7851,6 +7852,10 @@ add_ecmp_symmetric_reply_flows(struct hmap *lflows,
|
|
|
ebb439 |
ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_ARP_RESOLVE,
|
|
|
ebb439 |
200, ds_cstr(&ecmp_reply),
|
|
|
ebb439 |
action, &st_route->header_);
|
|
|
ebb439 |
+
|
|
|
ebb439 |
+ ds_destroy(&match);
|
|
|
ebb439 |
+ ds_destroy(&actions);
|
|
|
ebb439 |
+ ds_destroy(&ecmp_reply);
|
|
|
ebb439 |
}
|
|
|
ebb439 |
|
|
|
ebb439 |
static void
|
|
|
ebb439 |
--
|
|
|
ebb439 |
2.28.0
|
|
|
ebb439 |
|