]> git.puffer.fish Git - mirror/frr.git/commit
lib: create `frr_daemon_state_{load,save}`
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 25 Jan 2024 17:09:17 +0000 (18:09 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Sat, 27 Jan 2024 18:01:19 +0000 (19:01 +0100)
commitcd35ecc575a7b4b1a7ad134ccb3c76011ff5a347
treeed248e858bb785c4e8cb728ac0dde24284b36b57
parenta97d0c5875a562a16a9e3cbae03e615c16e47c87
lib: create `frr_daemon_state_{load,save}`

These functions load daemon-specific persistent state from
`/var/lib/frr` and supersede open-coded variants of similar calls in
ospfd, ospf6d and isisd to save GR state and/or sequence numbers.

Unlike the open-coded variants, the save call correctly `fsync()`s the
saved data to ensure disk contents are consistent.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/command.c
lib/libfrr.c
lib/libfrr.h