diff options
| author | Christian Hopps <chopps@labn.net> | 2024-07-23 17:42:07 -0400 |
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2024-07-23 17:50:33 -0400 |
| commit | be9a6fc0ea8180a4aaa558c5402ea543427e2e7e (patch) | |
| tree | 14ae456978e4ca164ffe6ef83965f92ea1a64db7 /lib/libfrr.h | |
| parent | f2d5bf7b67801c58a56251a774765d1311c1190b (diff) | |
lib: mgmtd: fix too early daemon detach of mgmtd
Correct FRR startup counts on a daemon's vty socket to be open when the
parent process exits. The parent process waits for `frr_check_detach()`
to be called by the child before exiting. The problem is when the
`FRR_MANUAL_VTY_START` flag is set the vty socket was not opened but
`frr_check_detach()` was called anyway.
Instead add a bool option for `frr_check_detach()` to be called when the
socket is opened with `frr_vty_serv_start()`, and do so when "manually"
calling said function (i.e., when FRR_MANUAL_VTY_START is set).
The `FRR_MANUAL_VTY_START` flag is only set by mgmtd. The reason we
wait to open the vty socket is so that mgmtd can parse the various
daemon specific config files it has taken over, after the event loop has
started, but before we receive any possible new config from `vtysh`.
fixes #16362
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/libfrr.h')
| -rw-r--r-- | lib/libfrr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libfrr.h b/lib/libfrr.h index 8018672c1a..3248670c83 100644 --- a/lib/libfrr.h +++ b/lib/libfrr.h @@ -202,7 +202,7 @@ extern void frr_config_fork(void); extern void frr_run(struct event_loop *master); extern void frr_detach(void); -extern void frr_vty_serv_start(void); +extern void frr_vty_serv_start(bool check_detach); extern void frr_vty_serv_stop(void); extern bool frr_zclient_addr(struct sockaddr_storage *sa, socklen_t *sa_len, |
