Merge pull request #18561 from opensourcerouting/fix/ipv6_duplicate_check

lib: Return duplicate ipv6 prefix-list entry test
This commit is contained in:
Jafar Al-Gharaibeh 2025-04-02 14:08:12 -05:00 committed by GitHub
commit d9a00d25d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1400,10 +1400,14 @@ DEFPY_YANG(
snprintf(xpath, sizeof(xpath), snprintf(xpath, sizeof(xpath),
"/frr-filter:lib/prefix-list[type='ipv6'][name='%s']", name); "/frr-filter:lib/prefix-list[type='ipv6'][name='%s']", name);
if (seq_str == NULL) { if (seq_str == NULL) {
/* Use XPath to find the next sequence number. */ if (plist_is_dup(vty->candidate_config->dnode, &pda))
sseq = acl_get_seq(vty, xpath, false); sseq = pda.pda_seq;
if (sseq < 0) else {
return CMD_WARNING_CONFIG_FAILED; /* 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), snprintfrr(xpath_entry, sizeof(xpath_entry),
"%s/entry[sequence='%" PRId64 "']", xpath, sseq); "%s/entry[sequence='%" PRId64 "']", xpath, sseq);