diff options
author | Fredi Raspall <fredi@voltanet.io> | 2021-06-01 10:59:36 +0200 |
---|---|---|
committer | Emanuele Di Pascale <emanuele@voltanet.io> | 2021-09-28 10:40:33 +0200 |
commit | d97e415dd5f2ffccf6e500f678b0efe25c909af3 (patch) | |
tree | b16987d6a0c3ad84d613c64c793fa4684d747604 /ospfd/ospf_sr.c | |
parent | ospfd: remove duplicate field update (diff) | |
download | frr-d97e415dd5f2ffccf6e500f678b0efe25c909af3.tar.xz frr-d97e415dd5f2ffccf6e500f678b0efe25c909af3.zip |
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>
Diffstat (limited to 'ospfd/ospf_sr.c')
-rw-r--r-- | ospfd/ospf_sr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c index fb2d07882..67e6630c8 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; } |