mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 11:50:21 +00:00
lib: fix broken "show yang operational-data" functionality
Previously was using an API that returned the root of the data tree given the users input xpath value, and then used it like it was the leaf node (last not first). So basically this CLI command only worked when one requested the root node of the model. Signed-off-by: Christian Hopps <chopps@labn.net>
This commit is contained in:
parent
9e0241c8fb
commit
4ac51e2430
@ -2129,8 +2129,8 @@ int nb_oper_data_iterate(const char *xpath, struct yang_translator *translator,
|
||||
* all YANG lists (if any).
|
||||
*/
|
||||
|
||||
LY_ERR err = lyd_new_path(NULL, ly_native_ctx, xpath, NULL,
|
||||
LYD_NEW_PATH_UPDATE, &dnode);
|
||||
LY_ERR err = lyd_new_path2(NULL, ly_native_ctx, xpath, NULL, 0, 0,
|
||||
LYD_NEW_PATH_UPDATE, NULL, &dnode);
|
||||
if (err || !dnode) {
|
||||
const char *errmsg =
|
||||
err ? ly_errmsg(ly_native_ctx) : "node not found";
|
||||
|
Loading…
Reference in New Issue
Block a user