]> git.ipfire.org Git - thirdparty/bird.git/commit
Conf: Free stored old config before parsing new one
authorOndrej Zajicek <santiago@crfreenet.org>
Wed, 9 Nov 2022 20:09:16 +0000 (21:09 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Wed, 9 Nov 2022 20:54:45 +0000 (21:54 +0100)
commit371eb49043d225d2bab8149187b813a14b4b86d2
tree4b25595f3d68b2d0a64cbfbf2ab2987e9b8b163e
parent84545a26cc3f7ce68408a663c1ad4a50edccdacc
Conf: Free stored old config before parsing new one

BIRD keeps a previous (old) configuration for the purpose of undo. The
existing code frees it after a new configuration is successfully parsed
during reconfiguration. That causes memory usage spikes as there are
temporarily three configurations (old, current, and new). The patch
changes it to free the old one before parsing the new one (as user
already requested a new config). The disadvantage is that undo is
not available after failed reconfiguration.
conf/conf.c
conf/conf.h
doc/bird.sgml
sysdep/unix/main.c