ospfd: fix processing of ext prefix in SR

The existing logic was not comparing the prefix of the extended
prefix TLV. As a result, the code was removing all of the prefix
SIDs except the one received on every LSA update.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
This commit is contained in:
Fredi Raspall 2021-06-01 10:59:36 +02:00 committed by Emanuele Di Pascale
parent 1a41378ecc
commit d97e415dd5

View File

@ -1245,7 +1245,9 @@ static void update_ext_prefix_sid(struct sr_node *srn, struct sr_prefix *srp)
/* Search for existing Segment Prefix */
for (ALL_LIST_ELEMENTS_RO(srn->ext_prefix, node, pref))
if (pref->instance == srp->instance) {
if (pref->instance == srp->instance
&& prefix_same((struct prefix *)&srp->prefv4,
&pref->prefv4)) {
found = true;
break;
}