From d97e415dd5f2ffccf6e500f678b0efe25c909af3 Mon Sep 17 00:00:00 2001 From: Fredi Raspall Date: Tue, 1 Jun 2021 10:59:36 +0200 Subject: [PATCH] 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 --- ospfd/ospf_sr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c index fb2d078823..67e6630c83 100644 --- a/ospfd/ospf_sr.c +++ b/ospfd/ospf_sr.c @@ -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; }