summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_lsa.c
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@users.noreply.github.com>2020-11-03 11:59:38 -0300
committerGitHub <noreply@github.com>2020-11-03 11:59:38 -0300
commit7c62dc76d4e78cce352d511fea89f908a9ee30ce (patch)
treeb7eadd961c71dd302d2c1800cb1d6abee2677c38 /ospf6d/ospf6_lsa.c
parente035e7142ecaae8f284f533b508cab5108350631 (diff)
parent96117716ba3f194d75ef45e630b0a0b551e0a313 (diff)
Merge pull request #7261 from Niral-Networks/niral_dev_vrf_ospf6
ospf6d : Transformation changes for ospf6 vrf support.
Diffstat (limited to 'ospf6d/ospf6_lsa.c')
-rw-r--r--ospf6d/ospf6_lsa.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c
index 058284f5e9..29141ee7f8 100644
--- a/ospf6d/ospf6_lsa.c
+++ b/ospf6d/ospf6_lsa.c
@@ -45,6 +45,27 @@
vector ospf6_lsa_handler_vector;
+struct ospf6 *ospf6_get_by_lsdb(struct ospf6_lsa *lsa)
+{
+ struct ospf6 *ospf6 = NULL;
+
+ switch (OSPF6_LSA_SCOPE(lsa->header->type)) {
+ case OSPF6_SCOPE_LINKLOCAL:
+ ospf6 = OSPF6_INTERFACE(lsa->lsdb->data)->area->ospf6;
+ break;
+ case OSPF6_SCOPE_AREA:
+ ospf6 = OSPF6_AREA(lsa->lsdb->data)->ospf6;
+ break;
+ case OSPF6_SCOPE_AS:
+ ospf6 = OSPF6_PROCESS(lsa->lsdb->data);
+ break;
+ default:
+ assert(0);
+ break;
+ }
+ return ospf6;
+}
+
static int ospf6_unknown_lsa_show(struct vty *vty, struct ospf6_lsa *lsa)
{
uint8_t *start, *end, *current;
@@ -626,6 +647,7 @@ struct ospf6_lsa *ospf6_lsa_unlock(struct ospf6_lsa *lsa)
int ospf6_lsa_expire(struct thread *thread)
{
struct ospf6_lsa *lsa;
+ struct ospf6 *ospf6;
lsa = (struct ospf6_lsa *)THREAD_ARG(thread);
@@ -642,7 +664,7 @@ int ospf6_lsa_expire(struct thread *thread)
if (CHECK_FLAG(lsa->flag, OSPF6_LSA_HEADERONLY))
return 0; /* dbexchange will do something ... */
-
+ ospf6 = ospf6_get_by_lsdb(lsa);
/* reinstall lsa */
ospf6_install_lsa(lsa);
@@ -703,7 +725,7 @@ int ospf6_lsa_refresh(struct thread *thread)
return 0;
}
-void ospf6_flush_self_originated_lsas_now(void)
+void ospf6_flush_self_originated_lsas_now(struct ospf6 *ospf6)
{
struct listnode *node;
struct ospf6_area *oa;