RT value will be unique across different VNIs but the
same across routers (in the same AS) for a particula
VNI.
It is unique, so add `break` for search procedure.
Signed-off-by: anlan_cs <vic.lan@pica8.com>
ecomadd = ecommunity_new();
ecommunity_add_val(ecomadd, &eval, false, false);
for (ALL_LIST_ELEMENTS_RO(rtl, node, ecom))
- if (ecommunity_cmp(ecomadd, ecom))
+ if (ecommunity_cmp(ecomadd, ecom)) {
ecom_found = true;
+ break;
+ }
if (!ecom_found)
listnode_add_sort(rtl, ecomadd);
if (ecommunity_match(ecom, ecom_auto)) {
ecommunity_free(&ecom);
node_to_del = node;
+ break;
}
}