summaryrefslogtreecommitdiff
path: root/ospfd/ospf_lsdb.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2022-10-12 09:30:36 -0400
committerGitHub <noreply@github.com>2022-10-12 09:30:36 -0400
commit984eb32b588186ac946733c5c3fe8032bae28ebc (patch)
treefadbfb00938fbd06eb92909bfe628857b7b3d00f /ospfd/ospf_lsdb.c
parent87d54383c520799a90457e84e2242b6fa2024f73 (diff)
parent80f6ea8b99188b9d8e79fe4fc1740cc92375d7bc (diff)
Merge pull request #11159 from maduri111/bgpd-orr
bgpd: optimal route reflection
Diffstat (limited to 'ospfd/ospf_lsdb.c')
-rw-r--r--ospfd/ospf_lsdb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ospfd/ospf_lsdb.c b/ospfd/ospf_lsdb.c
index f4fb858a5f..3c65ac388d 100644
--- a/ospfd/ospf_lsdb.c
+++ b/ospfd/ospf_lsdb.c
@@ -30,6 +30,7 @@
#include "ospfd/ospf_asbr.h"
#include "ospfd/ospf_lsa.h"
#include "ospfd/ospf_lsdb.h"
+#include "ospfd/ospf_orr.h"
struct ospf_lsdb *ospf_lsdb_new(void)
{
@@ -87,6 +88,10 @@ static void ospf_lsdb_delete_entry(struct ospf_lsdb *lsdb,
assert(rn->table == lsdb->type[lsa->data->type].db);
+ /* Update ORR Root table MPLS-TE Router address's advertise router */
+ if (lsa->data->type == OSPF_OPAQUE_AREA_LSA)
+ ospf_orr_root_table_update(lsa, false);
+
if (IS_LSA_SELF(lsa))
lsdb->type[lsa->data->type].count_self--;
lsdb->type[lsa->data->type].count--;
@@ -134,6 +139,10 @@ void ospf_lsdb_add(struct ospf_lsdb *lsdb, struct ospf_lsa *lsa)
#endif /* MONITOR_LSDB_CHANGE */
lsdb->type[lsa->data->type].checksum += ntohs(lsa->data->checksum);
rn->info = ospf_lsa_lock(lsa); /* lsdb */
+
+ /* Update ORR Root table MPLS-TE Router address's advertise router */
+ if (lsa->data->type == OSPF_OPAQUE_AREA_LSA)
+ ospf_orr_root_table_update(lsa, true);
}
void ospf_lsdb_delete(struct ospf_lsdb *lsdb, struct ospf_lsa *lsa)