]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixed memory bloating on kernel merge paths together with export filter.
authorJan Moskyto Matejka <mq@ucw.cz>
Wed, 12 Oct 2016 12:16:34 +0000 (14:16 +0200)
committerJan Moskyto Matejka <mq@ucw.cz>
Wed, 12 Oct 2016 12:22:01 +0000 (14:22 +0200)
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.

nest/rt-table.c

index d3aba085ce2d05664eac96efec9a87faa56201ff..00476069a210d2df140c5ab8e2e756ebe1fe630e 100644 (file)
@@ -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 *