Skip to content

lib: Return duplicate prefix-list entry test (backport #18494) #18570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib/filter_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading