Skip to content

Commit

Permalink
confd: srx: Duplicate entire tree in srx_get_diff
Browse files Browse the repository at this point in the history
Use the _siblings variant to ensure that the full diff tree is
duplicated. Otherwise, the caller would only see the first branch of
changes.
  • Loading branch information
wkz committed May 25, 2023
1 parent 6adb508 commit 3dbc591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/confd/src/srx_val.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sr_error_t srx_get_diff(sr_session_ctx_t *session, struct lyd_node **treep)
* tree being the first member. */
tree = *((struct lyd_node **)iter);

if (lyd_dup_single(tree, NULL, LYD_DUP_RECURSIVE, treep))
if (lyd_dup_siblings(tree, NULL, LYD_DUP_RECURSIVE, treep))
err = SR_ERR_LY;

sr_free_change_iter(iter);
Expand Down

0 comments on commit 3dbc591

Please sign in to comment.