summaryrefslogtreecommitdiff
path: root/ospf6d
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_abr.c6
-rw-r--r--ospf6d/ospf6_bfd.c1
-rw-r--r--ospf6d/ospf6_route.c6
-rw-r--r--ospf6d/ospf6_top.c7
4 files changed, 15 insertions, 5 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c
index 286e642781..1af8aed1a9 100644
--- a/ospf6d/ospf6_abr.c
+++ b/ospf6d/ospf6_abr.c
@@ -1224,8 +1224,6 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
if (table->hook_add)
(*table->hook_add)(old_route);
- /* Delete new route */
- ospf6_route_delete(route);
break;
}
@@ -1253,7 +1251,9 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
listnode_add_sort(route->paths, path);
/* ospf6_ia_add_nw_route (table, &prefix, route); */
ospf6_route_add(route, table);
- }
+ } else
+ /* if we did not add the route remove it */
+ ospf6_route_delete(route);
}
void ospf6_abr_examin_brouter(uint32_t router_id, struct ospf6_route *route,
diff --git a/ospf6d/ospf6_bfd.c b/ospf6d/ospf6_bfd.c
index ba8c398dee..fc1e718540 100644
--- a/ospf6d/ospf6_bfd.c
+++ b/ospf6d/ospf6_bfd.c
@@ -143,6 +143,7 @@ void ospf6_bfd_info_nbr_create(struct ospf6_interface *oi,
bfd_sess_set_ipv6_addrs(on->bfd_session, on->ospf6_if->linklocal_addr,
&on->linklocal_addr);
bfd_sess_set_interface(on->bfd_session, oi->interface->name);
+ bfd_sess_set_vrf(on->bfd_session, oi->interface->vrf_id);
bfd_sess_set_profile(on->bfd_session, oi->bfd_config.profile);
}
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c
index 2daf119c52..908011c946 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -39,6 +39,7 @@
#include "ospf6_zebra.h"
DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_ROUTE, "OSPF6 route");
+DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_ROUTE_TABLE, "OSPF6 route table");
DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_NEXTHOP, "OSPF6 nexthop");
DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_PATH, "OSPF6 Path");
@@ -1021,7 +1022,8 @@ void ospf6_route_remove_all(struct ospf6_route_table *table)
struct ospf6_route_table *ospf6_route_table_create(int s, int t)
{
struct ospf6_route_table *new;
- new = XCALLOC(MTYPE_OSPF6_ROUTE, sizeof(struct ospf6_route_table));
+ new = XCALLOC(MTYPE_OSPF6_ROUTE_TABLE,
+ sizeof(struct ospf6_route_table));
new->table = route_table_init();
new->scope_type = s;
new->table_type = t;
@@ -1033,7 +1035,7 @@ void ospf6_route_table_delete(struct ospf6_route_table *table)
ospf6_route_remove_all(table);
bf_free(table->idspace);
route_table_finish(table->table);
- XFREE(MTYPE_OSPF6_ROUTE, table);
+ XFREE(MTYPE_OSPF6_ROUTE_TABLE, table);
}
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 2376409ccd..42405ca35e 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -413,6 +413,7 @@ void ospf6_delete(struct ospf6 *o)
{
struct listnode *node, *nnode;
struct ospf6_area *oa;
+ struct vrf *vrf;
QOBJ_UNREG(o);
@@ -442,6 +443,12 @@ void ospf6_delete(struct ospf6 *o)
ospf6_distance_reset(o);
route_table_finish(o->distance_table);
+ if (o->vrf_id != VRF_UNKNOWN) {
+ vrf = vrf_lookup_by_id(o->vrf_id);
+ if (vrf)
+ ospf6_vrf_unlink(o, vrf);
+ }
+
XFREE(MTYPE_OSPF6_TOP, o->name);
XFREE(MTYPE_OSPF6_TOP, o);
}