summaryrefslogtreecommitdiff
path: root/conf/conf.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2022-11-09 21:09:16 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2022-11-09 21:54:45 +0100
commit371eb49043d225d2bab8149187b813a14b4b86d2 (patch)
tree4b25595f3d68b2d0a64cbfbf2ab2987e9b8b163e /conf/conf.h
parent84545a26cc3f7ce68408a663c1ad4a50edccdacc (diff)
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.
Diffstat (limited to 'conf/conf.h')
-rw-r--r--conf/conf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/conf/conf.h b/conf/conf.h
index 5ec924b0..b409750e 100644
--- a/conf/conf.h
+++ b/conf/conf.h
@@ -70,6 +70,7 @@ struct config *config_alloc(const char *name);
int config_parse(struct config *);
int cli_parse(struct config *);
void config_free(struct config *);
+void config_free_old(void);
int config_commit(struct config *, int type, uint timeout);
int config_confirm(void);
int config_undo(void);