]> git.puffer.fish Git - mirror/frr.git/commit
lib: fix dnode_create to use correct libyang function. 17884/head
authorChristian Hopps <chopps@labn.net>
Sat, 18 Jan 2025 23:39:32 +0000 (23:39 +0000)
committerChristian Hopps <chopps@labn.net>
Sat, 18 Jan 2025 23:39:32 +0000 (23:39 +0000)
commit60666745a8549ce9e216a7660043dfdb36299cb0
tree5bb5e5fbb731204b6e26214744c16b60712ccad3
parent3c3b559706ecd569e7327ecbe9a8800a763a8ddf
lib: fix dnode_create to use correct libyang function.

The previous use of `lyd_new_path()` returns the first node created, rather
than the xpath target node. The code is lucky in the sense that it is
normally only creating a single node rather than a branch. Fix this to
use `lyd_new_path2()` which returns the target node to actually implement
the semantics expected by callers of `dnode_create()` (i.e., returning the
newly created target node).

Signed-off-by: Christian Hopps <chopps@labn.net>
lib/northbound.c