]> git.puffer.fish Git - mirror/frr.git/commit
mgmtd: fix printing an empty data tree
authorIgor Ryzhov <iryzhov@nfware.com>
Sun, 28 Jan 2024 00:35:14 +0000 (02:35 +0200)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 31 Jan 2024 00:20:13 +0000 (02:20 +0200)
commitdda5de0340f30ed15cc172046b451e013ad5e16e
tree71baac71cb693b3f628799c1cfcaae79d7802e3a
parente13c590abe1217c8088a9493069a448d356d5c00
mgmtd: fix printing an empty data tree

We don't need to create an actual tree to print an empty tree, libyang
handles NULL just fine. The actual problem is that `yang_dnode_new`
creates a tree by validating it, and the validation creates all implicit
default nodes. Therefore, when called with "with-default" flags, instead
of getting an empty tree, we get a tree with all top-level default set.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
mgmtd/mgmt_fe_adapter.c