Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: fix dnode_create to use correct libyang function. #17884

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

choppsv1
Copy link
Contributor

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).

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 <[email protected]>
@ton31337 ton31337 merged commit 9792795 into FRRouting:master Jan 20, 2025
18 checks passed
@choppsv1 choppsv1 deleted the chopps/fix-dnode-create branch January 23, 2025 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants