]> git.puffer.fish Git - mirror/frr.git/commit
lib: register dependency between control plane protocol and vrf nb nodes 8156/head
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 16 Feb 2021 09:57:01 +0000 (12:57 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Fri, 26 Feb 2021 11:42:57 +0000 (14:42 +0300)
commit683b3fe3f478e5b5a6248e81a5023873d3c6bf8b
tree9a4c0dfac52b0713a0ccfea717335fe8be6ff270
parentb45248fb6d3043d345996aa874224777805d48f3
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.

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