summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_lsa.c
diff options
context:
space:
mode:
authorharios_niral <hari@niralnetworks.com>2020-10-08 07:38:43 +0200
committerharios_niral <hari@niralnetworks.com>2020-10-31 07:50:08 +0100
commitbeadc736bbd27da5d2bb6f2770fceea7af227ef3 (patch)
treecd3b630a3556f93fd68c80d087051882ae56e138 /ospf6d/ospf6_lsa.c
parentMerge pull request #7333 from mjstapp/fix_multi_connected (diff)
downloadfrr-beadc736bbd27da5d2bb6f2770fceea7af227ef3.tar.xz
frr-beadc736bbd27da5d2bb6f2770fceea7af227ef3.zip
ospf6d : Transformation changes for ospf6 vrf support.
1. All the changes are related to handle ospf6 with different vrf. 2. The dependancy of global ospf6 is removed. Co-authored-by: Kaushik <kaushik@niralnetworks.com> Signed-off-by: harios_niral <hari@niralnetworks.com>
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 058284f5e..29141ee7f 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;