diff options
| author | G. Paul Ziemba <paulz@labn.net> | 2025-03-30 15:43:04 -0700 |
|---|---|---|
| committer | G. Paul Ziemba <paulz@labn.net> | 2025-03-31 08:45:33 -0700 |
| commit | 1629c05924fe96ab487d3ba6bafbe7f11679274c (patch) | |
| tree | ffd7011cd3564be153c6157deb16a44ca4c93b64 /bgpd/rfapi/rfapi_rib.h | |
| parent | a02ec27693ddfa708ec1f62400af6cea533bf1e8 (diff) | |
bgpd: rfapi: track outstanding rib and import timers, free mem at exit
While here, also make "VPN SAFI clear" test wait for clear result
(tests/topotests/bgp_rfapi_basic_sanity{,_config2})
Original RFAPI code relied on the frr timer system to remember
various allocations that were supposed to be freed at future times
rather than manage a parallel database. However, if bgpd is terminated
before the times expire, those pending allocations are marked as
memory leaks, even though they wouldn't be leaks under normal operation.
This change adds some hash tables to track these outstanding
allocations that are associated with pending timers, and uses
those tables to free the allocations when bgpd exits.
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
Diffstat (limited to 'bgpd/rfapi/rfapi_rib.h')
| -rw-r--r-- | bgpd/rfapi/rfapi_rib.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/rfapi/rfapi_rib.h b/bgpd/rfapi/rfapi_rib.h index 5fa838bd34..3e34f26fcd 100644 --- a/bgpd/rfapi/rfapi_rib.h +++ b/bgpd/rfapi/rfapi_rib.h @@ -138,4 +138,7 @@ extern int rfapi_rib_key_cmp(const void *k1, const void *k2); extern void rfapiAdbFree(struct rfapi_adb *adb); +extern void rfapi_rib_init(void); +extern void rfapi_rib_terminate(void); + #endif /* QUAGGA_HGP_RFAPI_RIB_H */ |
