summaryrefslogtreecommitdiffstats
path: root/lib/yang.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-03-10 16:35:21 +0100
committerIgor Ryzhov <iryzhov@nfware.com>2024-03-10 19:51:55 +0100
commitfb912e09004fde46ad4447c6d563b195ee159088 (patch)
treed6d0da0dd4f5a1ffe9b56cb6d74d41cb39dade70 /lib/yang.c
parentMerge pull request #15515 from opensourcerouting/zlog-recirculate-ldpd (diff)
downloadfrr-fb912e09004fde46ad4447c6d563b195ee159088.tar.xz
frr-fb912e09004fde46ad4447c6d563b195ee159088.zip
lib: fix initialization of northbound nodes
When actions and notification are defined as descendants of other nodes, they are not getting initialized, because the iterator skips them. Fix the iterator to include them when traversing the schema. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/yang.c')
-rw-r--r--lib/yang.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/yang.c b/lib/yang.c
index 03044fc29..d71cb2f49 100644
--- a/lib/yang.c
+++ b/lib/yang.c
@@ -199,6 +199,16 @@ next:
if (ret == YANG_ITER_STOP)
return ret;
}
+ LY_LIST_FOR ((const struct lysc_node *)lysc_node_notifs(snode), child) {
+ ret = yang_snodes_iterate_subtree(child, module, cb, flags, arg);
+ if (ret == YANG_ITER_STOP)
+ return ret;
+ }
+ LY_LIST_FOR ((const struct lysc_node *)lysc_node_actions(snode), child) {
+ ret = yang_snodes_iterate_subtree(child, module, cb, flags, arg);
+ if (ret == YANG_ITER_STOP)
+ return ret;
+ }
return ret;
}