mirror_frr/staticd
Louis Scalbert a77ea81ef3 lib: do not reopen a zclient socket for bfd
b7ca809d1c ("lib: BFD automatic source selection") has added a dedicated
zclient socket for nht tracking. Since the bfd lib is used by daemons
that already has a zclient socket, those daemons has now a second
zclient socket. However, zebra does not distinguish the two zclient
sessions. For example, the interfaces are asked a second via
zebra_message_send(zclient, ZEBRA_INTERFACE_ADD, VRF_DEFAULT) in
zclient_start(). As a result, callbacks functions like bgp_ifp_create()
are called a second time, which causes some processing overhead and
might cause bugs.

Re-use the existing zclient socket for nht tracking.

Note that BFD automatic source selection is only currently implemented
in staticd. Other daemons will require to add the following in their
ZEBRA_NEXTHOP_UPDATE callback function:

> 	if (zclient->bfd_integration)
>		bfd_nht_update(&matched, &nhr);

Fixes: b7ca809d1c ("lib: BFD automatic source selection")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-01-24 16:08:04 +01: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: add debug static bfd command 2023-01-13 15:32:12 -03:00
static_debug.c staticd: add debug static bfd command 2023-01-13 15:32:12 -03:00
static_debug.h staticd: add debug static bfd command 2023-01-13 15:32:12 -03:00
static_main.c staticd: Clean up zclient on shutdown 2022-10-12 07:39:23 -04:00
static_nb_config.c staticd: BFD integration northbound support 2023-01-13 15:32:12 -03:00
static_nb.c staticd: BFD integration northbound support 2023-01-13 15:32:12 -03:00
static_nb.h staticd: BFD integration northbound support 2023-01-13 15:32:12 -03:00
static_nht.c staticd: track nexthops per-SAFI 2022-03-27 14:57:22 +02:00
static_nht.h staticd: track nexthops per-SAFI 2022-03-27 14:57:22 +02:00
static_routes.c staticd: fix bug on route reinstallation 2023-01-13 15:32:12 -03:00
static_routes.h staticd: add command to show monitored routes 2023-01-13 15:32:12 -03:00
static_vrf.c *: rework renaming the default VRF 2021-12-21 22:09:29 +03:00
static_vrf.h *: cleanup ifp->vrf_id 2021-11-22 20:47:23 +03:00
static_vty.c staticd: add debug static bfd command 2023-01-13 15:32:12 -03:00
static_vty.h lib: northbound cli show/cmd functions must not modify data nodes 2021-10-13 20:12:35 +03:00
static_zebra.c lib: do not reopen a zclient socket for bfd 2023-01-24 16:08:04 +01:00
static_zebra.h staticd: merge NHT register & update, reorganize 2022-04-24 17:19:47 +02:00
subdir.am staticd: BFD integration northbound support 2023-01-13 15:32:12 -03:00