mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 21:47:15 +02:00
Merge pull request #18561 from opensourcerouting/fix/ipv6_duplicate_check
lib: Return duplicate ipv6 prefix-list entry test
This commit is contained in:
commit
d9a00d25d9
|
@ -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) {
|
||||||
|
if (plist_is_dup(vty->candidate_config->dnode, &pda))
|
||||||
|
sseq = pda.pda_seq;
|
||||||
|
else {
|
||||||
/* Use XPath to find the next sequence number. */
|
/* Use XPath to find the next sequence number. */
|
||||||
sseq = acl_get_seq(vty, xpath, false);
|
sseq = acl_get_seq(vty, xpath, false);
|
||||||
if (sseq < 0)
|
if (sseq < 0)
|
||||||
return CMD_WARNING_CONFIG_FAILED;
|
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);
|
||||||
|
|
Loading…
Reference in a new issue