summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_route.c
diff options
context:
space:
mode:
authorMobashshera Rasool <mrasool@vmware.com>2021-07-15 15:47:36 +0000
committerMobashshera Rasool <mrasool@vmware.com>2021-07-21 05:20:30 +0000
commit22813fdb86cc1caa38a24ca241e4f874c85769e2 (patch)
tree6bc99d751a2ff0b794c056957c18798e7d086c26 /ospf6d/ospf6_route.c
parent789828186e64e7ce9d1234e27eade1efe076dd4e (diff)
ospf6d: Store ospf6 back pointer in route struct
Storing the pointer to ospf6 struct in route struct. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Diffstat (limited to 'ospf6d/ospf6_route.c')
-rw-r--r--ospf6d/ospf6_route.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c
index d785e623b4..43de870ad7 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -453,7 +453,7 @@ void ospf6_copy_paths(struct list *dst, struct list *src)
}
}
-struct ospf6_route *ospf6_route_create(void)
+struct ospf6_route *ospf6_route_create(struct ospf6 *ospf6)
{
struct ospf6_route *route;
@@ -464,6 +464,8 @@ struct ospf6_route *ospf6_route_create(void)
route->paths = list_new();
route->paths->cmp = (int (*)(void *, void *))ospf6_path_cmp;
route->paths->del = (void (*)(void *))ospf6_path_free;
+ route->ospf6 = ospf6;
+
return route;
}
@@ -482,7 +484,7 @@ struct ospf6_route *ospf6_route_copy(struct ospf6_route *route)
{
struct ospf6_route *new;
- new = ospf6_route_create();
+ new = ospf6_route_create(route->ospf6);
new->type = route->type;
memcpy(&new->prefix, &route->prefix, sizeof(struct prefix));
new->installed = route->installed;