The function `sid_exist` verifies if a given SRv6 SID has already been
allocated for a given IS-IS area. This commit extends `sid_exist` to
also consider adjacency SIDs when checking for the existence of the SID.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
{
struct listnode *node;
struct isis_srv6_sid *s;
+ struct srv6_adjacency *sra;
for (ALL_LIST_ELEMENTS_RO(area->srv6db.srv6_sids, node, s))
if (sid_same(&s->sid, sid))
return true;
+ for (ALL_LIST_ELEMENTS_RO(area->srv6db.srv6_endx_sids, node, sra))
+ if (sid_same(&sra->sid, sid))
+ return true;
return false;
}