summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_zebra.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2023-05-16 08:37:19 -0400
committerGitHub <noreply@github.com>2023-05-16 08:37:19 -0400
commit425fc1f5b7f42c16d27ecdc602546d4521793d6f (patch)
tree7a12a2bec6d0ab06aa61c54fc738081893eadd41 /ospf6d/ospf6_zebra.c
parentcf0eeb3dc17d7ff9a4874464e95dbf6d971cb437 (diff)
parent6a3631468d4d5ef2a29f371aab021e6b9a4490a9 (diff)
Merge pull request #12949 from opensourcerouting/ospf-unplanned-gr
OSPF GR for unplanned outages
Diffstat (limited to 'ospf6d/ospf6_zebra.c')
-rw-r--r--ospf6d/ospf6_zebra.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index 6b3d4955da..0f631c4d01 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -239,12 +239,18 @@ static int ospf6_zebra_gr_update(struct ospf6 *ospf6, int command,
int ospf6_zebra_gr_enable(struct ospf6 *ospf6, uint32_t stale_time)
{
+ if (IS_DEBUG_OSPF6_GR)
+ zlog_debug("Zebra enable GR [stale time %u]", stale_time);
+
return ospf6_zebra_gr_update(ospf6, ZEBRA_CLIENT_GR_CAPABILITIES,
stale_time);
}
int ospf6_zebra_gr_disable(struct ospf6 *ospf6)
{
+ if (IS_DEBUG_OSPF6_GR)
+ zlog_debug("Zebra disable GR");
+
return ospf6_zebra_gr_update(ospf6, ZEBRA_CLIENT_GR_DISABLE, 0);
}
@@ -735,10 +741,20 @@ uint8_t ospf6_distance_apply(struct prefix_ipv6 *p, struct ospf6_route * or,
static void ospf6_zebra_connected(struct zclient *zclient)
{
+ struct ospf6 *ospf6;
+ struct listnode *node;
+
/* Send the client registration */
bfd_client_sendmsg(zclient, ZEBRA_BFD_CLIENT_REGISTER, VRF_DEFAULT);
zclient_send_reg_requests(zclient, VRF_DEFAULT);
+
+ /* Activate graceful restart if configured. */
+ for (ALL_LIST_ELEMENTS_RO(om6->ospf6, node, ospf6)) {
+ if (!ospf6->gr_info.restart_support)
+ continue;
+ (void)ospf6_zebra_gr_enable(ospf6, ospf6->gr_info.grace_period);
+ }
}
static zclient_handler *const ospf6_handlers[] = {