mirror_frr/staticd
Igor Ryzhov 3c05d53bf8 staticd: fix nht memory leak
When a static route with a gateway nexthop is created, the nexthop is
sent to zebra for NHT, and added to a local hash. When the nexthop's VRF
is deleted from kernel, nexthop still stays in the hash. This is a
memory leak, because it is never deleted from there. Even if the VRF is
recreated in kernel, it is assigned with a new `vrf_id` so the old hash
entry is not reused, and a new one is created. To fix the issue, remove
all nexthops from the hash when the corresponding VRF is deleted, do not
add nexthops to the hash if their corresponding VRF doesn't exist in
kernel and don't add the same nexthop to the hash multiple times.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-02-04 22:28:10 +02:00
..
.gitignore staticd: Start the addition of a staticd 2018-07-29 12:37:24 -04:00
Makefile staticd: Start the addition of a staticd 2018-07-29 12:37:24 -04:00
static_bfd.c staticd: fix NB dependency hack 2024-02-02 00:57:59 +02:00
static_debug.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
static_debug.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
static_main.c staticd: fix NB dependency hack 2024-02-02 00:57:59 +02:00
static_nb_config.c staticd: fix NB dependency hack 2024-02-02 00:57:59 +02:00
static_nb.c mgmtd, staticd: output staticd configuration from mgmtd 2023-11-21 13:28:40 +02:00
static_nb.h staticd: fix NB dependency hack 2024-02-02 00:57:59 +02:00
static_nht.c staticd: fix processing nht updates 2024-02-04 22:28:10 +02:00
static_nht.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
static_routes.c staticd: fix nht memory leak 2024-02-04 22:28:10 +02:00
static_routes.h staticd: add a separate function for uninstalling nexthops 2024-02-04 22:28:10 +02:00
static_vrf.c staticd: fix NB dependency hack 2024-02-02 00:57:59 +02:00
static_vrf.h staticd: fix NB dependency hack 2024-02-02 00:57:59 +02:00
static_vty.c Revert "staticd: Accept full blackhole typed keywords for ip_route_cmd" 2024-02-02 00:25:15 +02:00
static_vty.h mgmtd, staticd: output staticd configuration from mgmtd 2023-11-21 13:28:40 +02:00
static_zebra.c staticd: don't send routes from disabled vrfs to zebra 2024-02-04 22:28:10 +02:00
static_zebra.h *: Convert struct event_master to struct event_loop 2023-03-24 08:32:17 -04:00
subdir.am isisd: staticd: need to link directly against libyang 2023-10-26 22:53:44 -04:00