]> git.proxmox.com Git - mirror_frr.git/commit
lib: fix removal of yang non-presence containers
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 28 Feb 2019 22:54:47 +0000 (19:54 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Sat, 2 Mar 2019 23:01:49 +0000 (20:01 -0300)
commit1912caa2caf14936379df830e028d1492a061988
tree9e940599a8f9406bb8d339d7cb887f34fccb5611
parentcacbffafc9f2e133d3c76f081635f67ae504d124
lib: fix removal of yang non-presence containers

Non-presence containers don't have "destroy" callbacks. So, once
a np-container is deleted, we need to call the "destroy" callbacks
of its child nodes instead.

This commit doesn't fix any real problem as of now since all
np-containers from the FRR YANG modules contain or one more mandatory
child nodes, so they can't be deleted (libyang will add missing
np-containers when validating data). Nevertheless, upcoming YANG
modules should benefit from this change.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/northbound.c