1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

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.
This commit is contained in:
Ondrej Zajicek
2022-11-09 21:09:16 +01:00
parent 84545a26cc
commit 371eb49043
4 changed files with 27 additions and 0 deletions

View File

@@ -1173,6 +1173,11 @@ This argument can be omitted if there exists only a single instance.
restarted otherwise. Changes in filters usually lead to restart of
affected protocols.
The previous configuration is saved and the user can switch back to it
with <ref id="cli-configure-undo" name="configure undo"> command. The
old saved configuration is released (even if the reconfiguration attempt
fails due to e.g. a syntax error).
If <cf/soft/ option is used, changes in filters does not cause BIRD to
restart affected protocols, therefore already accepted routes (according
to old filters) would be still propagated, but new routes would be