summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2025-04-02 14:08:12 -0500
committerGitHub <noreply@github.com>2025-04-02 14:08:12 -0500
commitd9a00d25d9da341f70efb1f461d628709dd07d0a (patch)
treea6b415898c670182b3435386a7845849d09c18ef
parentd10b08e4e85437c735861ace05e6d69a95407f02 (diff)
parent24ae7cd30a055dc17fc9d75762320e1359e005b2 (diff)
Merge pull request #18561 from opensourcerouting/fix/ipv6_duplicate_check
lib: Return duplicate ipv6 prefix-list entry test
-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 b3ad5fb46d..6d8d288d81 100644
--- a/lib/filter_cli.c
+++ b/lib/filter_cli.c
@@ -1400,10 +1400,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);