summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_top.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_top.c')
-rw-r--r--ospf6d/ospf6_top.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 6ff3789a80..3122d616cb 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -472,6 +472,12 @@ struct ospf6 *ospf6_instance_create(const char *name)
if (ospf6->fd < 0)
return ospf6;
+ /*
+ * Read from non-volatile memory whether this instance is performing a
+ * graceful restart or not.
+ */
+ ospf6_gr_nvm_read(ospf6);
+
thread_add_read(master, ospf6_receive, ospf6, ospf6->fd,
&ospf6->t_ospf6_receive);
@@ -488,7 +494,8 @@ void ospf6_delete(struct ospf6 *o)
QOBJ_UNREG(o);
ospf6_gr_helper_deinit(o);
- ospf6_flush_self_originated_lsas_now(o);
+ if (!o->gr_info.prepare_in_progress)
+ ospf6_flush_self_originated_lsas_now(o);
ospf6_disable(o);
ospf6_del(o);
@@ -555,6 +562,7 @@ static void ospf6_disable(struct ospf6 *o)
THREAD_OFF(o->t_distribute_update);
THREAD_OFF(o->t_ospf6_receive);
THREAD_OFF(o->t_external_aggr);
+ THREAD_OFF(o->gr_info.t_grace_period);
}
}
@@ -1519,7 +1527,6 @@ DEFUN(show_ipv6_ospf6, show_ipv6_ospf6_cmd,
bool uj = use_json(argc, argv);
json_object *json = NULL;
- OSPF6_CMD_CHECK_RUNNING();
OSPF6_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf);
for (ALL_LIST_ELEMENTS_RO(om6->ospf6, node, ospf6)) {
@@ -1560,7 +1567,6 @@ DEFUN(show_ipv6_ospf6_route, show_ipv6_ospf6_route_cmd,
int idx_arg_start = 4;
bool uj = use_json(argc, argv);
- OSPF6_CMD_CHECK_RUNNING();
OSPF6_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf);
if (idx_vrf > 0)
idx_arg_start += 2;
@@ -1594,7 +1600,6 @@ DEFUN(show_ipv6_ospf6_route_match, show_ipv6_ospf6_route_match_cmd,
int idx_start_arg = 4;
bool uj = use_json(argc, argv);
- OSPF6_CMD_CHECK_RUNNING();
OSPF6_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf);
if (idx_vrf > 0)
idx_start_arg += 2;
@@ -1629,7 +1634,6 @@ DEFUN(show_ipv6_ospf6_route_match_detail,
int idx_start_arg = 4;
bool uj = use_json(argc, argv);
- OSPF6_CMD_CHECK_RUNNING();
OSPF6_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf);
if (idx_vrf > 0)
idx_start_arg += 2;
@@ -1665,7 +1669,6 @@ DEFUN(show_ipv6_ospf6_route_type_detail, show_ipv6_ospf6_route_type_detail_cmd,
int idx_start_arg = 4;
bool uj = use_json(argc, argv);
- OSPF6_CMD_CHECK_RUNNING();
OSPF6_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf);
if (idx_vrf > 0)
idx_start_arg += 2;
@@ -2078,7 +2081,6 @@ DEFPY (show_ipv6_ospf6_external_aggregator,
if (uj)
json = json_object_new_object();
- OSPF6_CMD_CHECK_RUNNING();
OSPF6_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf);
for (ALL_LIST_ELEMENTS_RO(om6->ospf6, node, ospf6)) {
@@ -2236,6 +2238,7 @@ static int config_write_ospf6(struct vty *vty)
ospf6_distance_config_write(vty, ospf6);
ospf6_distribute_config_write(vty, ospf6);
ospf6_asbr_summary_config_write(vty, ospf6);
+ config_write_ospf6_gr(vty, ospf6);
config_write_ospf6_gr_helper(vty, ospf6);
vty_out(vty, "exit\n");