]> git.proxmox.com Git - mirror_frr.git/commit - lib/northbound.c
lib: fix iteration over YANG presence containers
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 17 Feb 2022 02:28:37 +0000 (23:28 -0300)
committerRafael F. Zalamena <rzalamena@opensourcerouting.org>
Wed, 2 Mar 2022 19:32:05 +0000 (16:32 -0300)
commit9b40fa1eae24b8aadac141f65ee025198018d00b
tree29aa3f5f1116575c8aa76f044cf0488e48bdc59a
parent852dfb3013cb122567834c77796921f0e0643107
lib: fix iteration over YANG presence containers

State-only and configuration presence-containers need to be treated
differently when iterating over YANG operational data. Currently the
get_elem() callback is used to know when a state-only p-container
exists or not, and configuration p-containers are assumed to always
exist, which is clearly wrong. Fix this by checking the running
configuration to know whether a rw p-container exists or not.

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