diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2025-04-12 16:56:30 -0400 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2025-04-13 03:27:54 +0000 |
| commit | 7bf5cb49641a9786bf3130b17d329bf9881bfcb3 (patch) | |
| tree | fdbd20b77125294b583c78c1e2b311419f380ab6 | |
| parent | 62f000d8627b493d3dcae9cfd4b0b4654e107e16 (diff) | |
bgpd: Prevent crash when issuing a show rpki connections
When attempting to check rpki status and the connection
has been turned off, let's check to see if we are connected
before we ask the rpki subsystem, else we will get a crash
in the rpki library.
Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
(cherry picked from commit dcf43ae009ffecf206fb8cf8896eb5cd616ba4e5)
| -rw-r--r-- | bgpd/bgp_rpki.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c index 04a709b350..aefb58094b 100644 --- a/bgpd/bgp_rpki.c +++ b/bgpd/bgp_rpki.c @@ -529,7 +529,10 @@ static struct rtr_mgr_group *get_groups(struct list *cache_list) inline bool is_synchronized(struct rpki_vrf *rpki_vrf) { - return rpki_vrf->rtr_is_synced; + if (is_running(rpki_vrf)) + return rpki_vrf->rtr_is_synced; + else + return false; } inline bool is_running(struct rpki_vrf *rpki_vrf) |
