diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-29 21:26:28 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-29 22:54:03 +0300 |
| commit | 18abe2b91ef41d4c6ccdd19ac505f6705db64f87 (patch) | |
| tree | 007ab35f8314d34ea06c245c2a84c47094d8c2f5 /lib/filter_nb.c | |
| parent | 45af60f0bbeadae78ff8f97ea638d3592e7605c9 (diff) | |
lib: fix checking for duplicated access-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 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/filter_nb.c b/lib/filter_nb.c index c83738e729..36ce5429c6 100644 --- a/lib/filter_nb.c +++ b/lib/filter_nb.c @@ -238,6 +238,9 @@ static int _acl_is_dup(const struct lyd_node *dnode, void *arg) && ada->ada_entry_dnode == dnode) return YANG_ITER_CONTINUE; + if (strcmp(yang_dnode_get_string(dnode, "action"), ada->ada_action)) + return YANG_ITER_CONTINUE; + /* Check if all values match. */ for (idx = 0; idx < ADA_MAX_VALUES; idx++) { /* No more values. */ @@ -292,6 +295,7 @@ static bool acl_cisco_is_dup(const struct lyd_node *dnode) /* Initialize. */ ada.ada_type = "ipv4"; ada.ada_name = yang_dnode_get_string(entry_dnode, "../name"); + ada.ada_action = yang_dnode_get_string(entry_dnode, "action"); ada.ada_entry_dnode = entry_dnode; /* Load all values/XPaths. */ @@ -341,6 +345,7 @@ static bool acl_zebra_is_dup(const struct lyd_node *dnode, break; } ada.ada_name = yang_dnode_get_string(entry_dnode, "../name"); + ada.ada_action = yang_dnode_get_string(entry_dnode, "action"); ada.ada_entry_dnode = entry_dnode; /* Load all values/XPaths. */ |
