]> git.ipfire.org Git - thirdparty/bird.git/commit
rt-table: Fix kernel protocol export filter memory bug
authorPavel Tvrdik <pawel.tvrdik@gmail.com>
Tue, 6 Sep 2016 15:08:45 +0000 (17:08 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 15 Sep 2016 13:57:51 +0000 (15:57 +0200)
commita290da25a16b7c79d4a7a87f522b4068bca04979
treec11f401192d57553db7f1da17f42f01d225d2194
parentbc00f058154bb4a630d24d64a55b5f181d235c63
rt-table: Fix kernel protocol export filter memory bug

Kernel protocol calls rt_export_merged(), which used @rte_update_pool for
temporary allocations, supposing it is called from other functions from
rt-table.c that handles locking and flushing of the linpool. Therefore,
linpool was not flushed properly and memory leaked.

Add linpool argument to rt_export_merged() and use @krt_filter_lp when
called from kernel protocol.

Thanks to Justin Cattle and Alexander Frolkin for the bugreport.

(Commit squashed and updated by Ondrej Zajicek)
nest/route.h
nest/rt-table.c
sysdep/unix/krt.c