summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_gr_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_gr_helper.c')
-rw-r--r--ospf6d/ospf6_gr_helper.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/ospf6d/ospf6_gr_helper.c b/ospf6d/ospf6_gr_helper.c
index d0536087c3..ad8998b1ed 100644
--- a/ospf6d/ospf6_gr_helper.c
+++ b/ospf6d/ospf6_gr_helper.c
@@ -360,6 +360,16 @@ int ospf6_process_grace_lsa(struct ospf6 *ospf6, struct ospf6_lsa *lsa,
return OSPF6_GR_NOT_HELPER;
}
+ if (ospf6->gr_info.restart_in_progress) {
+ if (IS_DEBUG_OSPF6_GR)
+ zlog_debug(
+ "%s: router is in the process of graceful restart",
+ __func__);
+ restarter->gr_helper_info.rejected_reason =
+ OSPF6_HELPER_RESTARTING;
+ return OSPF6_GR_NOT_HELPER;
+ }
+
/* check supported grace period configured
* if configured, use this to start the grace
* timer otherwise use the interval received
@@ -1009,10 +1019,11 @@ static void show_ospf6_gr_helper_details(struct vty *vty, struct ospf6 *ospf6,
/* Graceful Restart HELPER config Commands */
DEFPY(ospf6_gr_helper_enable,
ospf6_gr_helper_enable_cmd,
- "graceful-restart helper-only [A.B.C.D$rtr_id]",
+ "graceful-restart helper enable [A.B.C.D$rtr_id]",
"ospf6 graceful restart\n"
+ "ospf6 GR Helper\n"
"Enable Helper support\n"
- "Advertisement RouterId\n")
+ "Advertisement Router-ID\n")
{
VTY_DECLVAR_CONTEXT(ospf6, ospf6);
@@ -1031,11 +1042,12 @@ DEFPY(ospf6_gr_helper_enable,
DEFPY(ospf6_gr_helper_disable,
ospf6_gr_helper_disable_cmd,
- "no graceful-restart helper-only [A.B.C.D$rtr_id]",
+ "no graceful-restart helper enable [A.B.C.D$rtr_id]",
NO_STR
"ospf6 graceful restart\n"
- "Disable Helper support\n"
- "Advertisement RouterId\n")
+ "ospf6 GR Helper\n"
+ "Enable Helper support\n"
+ "Advertisement Router-ID\n")
{
VTY_DECLVAR_CONTEXT(ospf6, ospf6);
@@ -1155,7 +1167,10 @@ DEFPY(show_ipv6_ospf6_gr_helper,
bool detail = false;
ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME);
- OSPF6_CMD_CHECK_RUNNING();
+ if (ospf6 == NULL) {
+ vty_out(vty, "OSPFv3 is not configured\n");
+ return CMD_SUCCESS;
+ }
if (argv_find(argv, argc, "detail", &idx))
detail = true;
@@ -1341,14 +1356,14 @@ static int ospf6_cfg_write_helper_enable_rtr_walkcb(struct hash_bucket *backet,
struct advRtr *rtr = backet->data;
struct vty *vty = (struct vty *)arg;
- vty_out(vty, " graceful-restart helper-only %pI4\n", &rtr->advRtrAddr);
+ vty_out(vty, " graceful-restart helper enable %pI4\n", &rtr->advRtrAddr);
return HASHWALK_CONTINUE;
}
int config_write_ospf6_gr_helper(struct vty *vty, struct ospf6 *ospf6)
{
if (ospf6->ospf6_helper_cfg.is_helper_supported)
- vty_out(vty, " graceful-restart helper-only\n");
+ vty_out(vty, " graceful-restart helper enable\n");
if (!ospf6->ospf6_helper_cfg.strict_lsa_check)
vty_out(vty, " graceful-restart helper lsa-check-disable\n");
@@ -1373,6 +1388,6 @@ int config_write_ospf6_gr_helper(struct vty *vty, struct ospf6 *ospf6)
int config_write_ospf6_debug_gr_helper(struct vty *vty)
{
if (IS_DEBUG_OSPF6_GR)
- vty_out(vty, "debug ospf6 gr helper\n");
+ vty_out(vty, "debug ospf6 graceful-restart\n");
return 0;
}