summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2016-10-12 14:16:34 +0200
committerJan Moskyto Matejka <mq@ucw.cz>2016-10-12 14:22:01 +0200
commit2e7fb11a6e31324151c6db98df2fe26d2d6cffab (patch)
tree614023116ad8a93d61ca3884a4405ce2a6a24ada
parent9df52a98e2eae28f219510d4c3d65ec43a50c394 (diff)
Fixed memory bloating on kernel merge paths together with export filter.
Some memory was being allocated from bad linpool, not from the given one as they should. Thanks to Madhu and Justin Cattle for reporting this.
-rw-r--r--nest/rt-table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index d3aba085..00476069 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -65,7 +65,7 @@ make_tmp_attrs(struct rte *rt, struct linpool *pool)
{
struct ea_list *(*mta)(struct rte *rt, struct linpool *pool);
mta = rt->attrs->src->proto->make_tmp_attrs;
- return mta ? mta(rt, rte_update_pool) : NULL;
+ return mta ? mta(rt, pool) : NULL;
}
/* Like fib_route(), but skips empty net entries */
@@ -596,7 +596,7 @@ mpnh_merge_rta(struct mpnh *nhs, rta *a, linpool *pool, int max)
{
struct mpnh nh = { .gw = a->gw, .iface = a->iface };
struct mpnh *nh2 = (a->dest == RTD_MULTIPATH) ? a->nexthops : &nh;
- return mpnh_merge(nhs, nh2, 1, 0, max, rte_update_pool);
+ return mpnh_merge(nhs, nh2, 1, 0, max, pool);
}
rte *