]> git.proxmox.com Git - mirror_frr.git/commit
ripd: fix SIGHUP handling
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 2 Jul 2018 01:24:29 +0000 (22:24 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Sat, 27 Oct 2018 18:16:12 +0000 (16:16 -0200)
commitbc1bdde2f678b5ae21735461f724f1ed12da712e
treed39798ca915f38bf3bc2194ea1f92d945d539647
parent72010aca150703659f0fc979928f2ec3aa170d69
ripd: fix SIGHUP handling

We can now leverage the new northbound API to perform a full configuration
reload in ripd without the need for external help (i.e. frr-reload.py).

When vty_read_config() is called with the 'config' parameter set to
NULL, it performs a new configuration transaction where the running
configuration is *replaced* by the provided configuration file. With that
said, we don't need to do anything other than calling this function in
the SIGHUP handler of all FRR daemons. If a daemon hasn't been converted
to the new northbound model, vty_read_config() will simply *merge*
the configuration file into the running configuration.

The calls to rip_clean() and rip_reset() in the SIGUP handler were
changing configuration variables directly, bypassing the northbound
layer. Configuration variables should be changed only by the northbound
callbacks, and failure to respect that inevitably leads to inconsistencies
and crashes. Fix this.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ripd/rip_main.c
ripd/ripd.c
ripd/ripd.h