]> git.proxmox.com Git - mirror_frr.git/commit - lib/routing_nb.h
lib: register dependency between control plane protocol and vrf nb nodes
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 16 Feb 2021 09:57:01 +0000 (12:57 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 22 Feb 2021 15:53:24 +0000 (18:53 +0300)
commit2ada626940e6396a8313eb5688835e8fc38b571d
tree46300cad31968be2f7aabb4da51b9e43140f7067
parent09b150ef2a20948947981fedcc86c82fcfa51a75
lib: register dependency between control plane protocol and vrf nb nodes

When the control plane protocol is created, the vrf structure is
allocated, and its address is stored in the northbound node.
The vrf structure may later be deleted by the user, which will lead to
a stale pointer stored in this node.

Instead of this, allow daemons that use the vrf pointer to register the
dependency between the control plane protocol and vrf nodes. This will
guarantee that the nodes will always be created and deleted together, and
there won't be any stale pointers.

Add such registration to staticd and pimd.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
lib/routing_nb.h
lib/routing_nb_config.c
pimd/pim_main.c
staticd/static_main.c