summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2025-04-03 10:49:22 +0300
committerGitHub <noreply@github.com>2025-04-03 10:49:22 +0300
commitd067000c3a15a7b50d27f35da7ec65741b14e136 (patch)
tree6b0b751a7beb91ed400a8758baeb7eb5e7f2d8c7
parent865e8320bd7c530a926917f9a7228a25102bce93 (diff)
parent57022d187bc27894f48682715043c7c18d070edc (diff)
Merge pull request #18566 from FRRouting/mergify/bp/stable/10.2/pr-18561
lib: Return duplicate ipv6 prefix-list entry test (backport #18561)
-rw-r--r--lib/filter_cli.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/filter_cli.c b/lib/filter_cli.c
index c40c2a75fe..b6324b3dd1 100644
--- a/lib/filter_cli.c
+++ b/lib/filter_cli.c
@@ -1396,10 +1396,14 @@ DEFPY_YANG(
snprintf(xpath, sizeof(xpath),
"/frr-filter:lib/prefix-list[type='ipv6'][name='%s']", name);
if (seq_str == NULL) {
- /* Use XPath to find the next sequence number. */
- sseq = acl_get_seq(vty, xpath, false);
- if (sseq < 0)
- return CMD_WARNING_CONFIG_FAILED;
+ if (plist_is_dup(vty->candidate_config->dnode, &pda))
+ sseq = pda.pda_seq;
+ else {
+ /* Use XPath to find the next sequence number. */
+ sseq = acl_get_seq(vty, xpath, false);
+ if (sseq < 0)
+ return CMD_WARNING_CONFIG_FAILED;
+ }
snprintfrr(xpath_entry, sizeof(xpath_entry),
"%s/entry[sequence='%" PRId64 "']", xpath, sseq);