diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2025-04-03 16:42:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-03 16:42:25 -0500 |
| commit | e7e7dcef34d42292db9044f4cf4923bb9706c771 (patch) | |
| tree | 18e7db2f28482bc15dd978e18a297f6557398dc6 | |
| parent | d067000c3a15a7b50d27f35da7ec65741b14e136 (diff) | |
| parent | 6de86440a4a0e306cfa380031a7bce996e9909ed (diff) | |
Merge pull request #18570 from FRRouting/mergify/bp/stable/10.2/pr-18494
lib: Return duplicate prefix-list entry test (backport #18494)
| -rw-r--r-- | lib/filter_cli.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/filter_cli.c b/lib/filter_cli.c index b6324b3dd1..6d8d288d81 100644 --- a/lib/filter_cli.c +++ b/lib/filter_cli.c @@ -1206,10 +1206,14 @@ DEFPY_YANG( snprintf(xpath, sizeof(xpath), "/frr-filter:lib/prefix-list[type='ipv4'][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); |
