diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-30 00:37:52 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-30 00:37:52 +0300 |
| commit | 4179f151fe80584167dbeeb260144d0cfa171f16 (patch) | |
| tree | 151fd3524329487a948220a0733b412a57e17878 /lib/filter_nb.c | |
| parent | bf79e923167c79b2e813b7e7efda7211949d6378 (diff) | |
lib: fix checking for duplicated prefix-list entries
Restore the behavior that was before the NB conversion.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/filter_nb.c')
| -rw-r--r-- | lib/filter_nb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/filter_nb.c b/lib/filter_nb.c index 50325a39f9..3b650742f3 100644 --- a/lib/filter_nb.c +++ b/lib/filter_nb.c @@ -396,6 +396,9 @@ static int _plist_is_dup(const struct lyd_node *dnode, void *arg) && pda->pda_entry_dnode == dnode) return YANG_ITER_CONTINUE; + if (strcmp(yang_dnode_get_string(dnode, "action"), pda->pda_action)) + return YANG_ITER_CONTINUE; + /* Check if all values match. */ for (idx = 0; idx < PDA_MAX_VALUES; idx++) { /* No more values. */ @@ -449,6 +452,7 @@ static bool plist_is_dup_nb(const struct lyd_node *dnode) /* Initialize. */ pda.pda_type = yang_dnode_get_string(entry_dnode, "../type"); pda.pda_name = yang_dnode_get_string(entry_dnode, "../name"); + pda.pda_action = yang_dnode_get_string(entry_dnode, "action"); pda.pda_entry_dnode = entry_dnode; /* Load all values/XPaths. */ |
