summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_intra.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2021-09-17 12:22:07 -0400
committerGitHub <noreply@github.com>2021-09-17 12:22:07 -0400
commitca45d9e5bf497dddaf12623f4971b7803df78700 (patch)
treee4ed0e37a6ce3416ca1ee082ab2ec8b5031b983d /ospf6d/ospf6_intra.c
parent62aaaeb122ca282b15d58cbcae38093522abf0e8 (diff)
parentb275f44a4a7f5338d8dd6cb2baf80b61b549913e (diff)
Merge pull request #8985 from opensourcerouting/ospf6d-gr
ospf6d: introduce support for Graceful Restart (restarting mode)
Diffstat (limited to 'ospf6d/ospf6_intra.c')
-rw-r--r--ospf6d/ospf6_intra.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c
index 06a950156b..bea8cf0edd 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -47,6 +47,7 @@
#include "ospf6_flood.h"
#include "ospf6d.h"
#include "ospf6_spf.h"
+#include "ospf6_gr.h"
unsigned char conf_debug_ospf6_brouter = 0;
uint32_t conf_debug_ospf6_brouter_specific_router_id;
@@ -249,6 +250,13 @@ int ospf6_router_lsa_originate(struct thread *thread)
oa = (struct ospf6_area *)THREAD_ARG(thread);
oa->thread_router_lsa = NULL;
+ if (oa->ospf6->gr_info.restart_in_progress) {
+ if (IS_DEBUG_OSPF6_GR)
+ zlog_debug(
+ "Graceful Restart in progress, don't originate LSA");
+ return 0;
+ }
+
if (IS_OSPF6_DEBUG_ORIGINATE(ROUTER))
zlog_debug("Originate Router-LSA for Area %s", oa->name);
@@ -532,6 +540,13 @@ int ospf6_network_lsa_originate(struct thread *thread)
by ospf6_lsa_refresh (), and does not come here. */
assert(oi->area);
+ if (oi->area->ospf6->gr_info.restart_in_progress) {
+ if (IS_DEBUG_OSPF6_GR)
+ zlog_debug(
+ "Graceful Restart in progress, don't originate LSA");
+ return 0;
+ }
+
old = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_NETWORK),
htonl(oi->interface->ifindex),
oi->area->ospf6->router_id, oi->area->lsdb);
@@ -773,6 +788,14 @@ int ospf6_link_lsa_originate(struct thread *thread)
assert(oi->area);
+ if (oi->area->ospf6->gr_info.restart_in_progress) {
+ if (IS_DEBUG_OSPF6_GR)
+ zlog_debug(
+ "Graceful Restart in progress, don't originate LSA");
+ return 0;
+ }
+
+
/* find previous LSA */
old = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_LINK),
htonl(oi->interface->ifindex),
@@ -1009,6 +1032,13 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread)
oa = (struct ospf6_area *)THREAD_ARG(thread);
oa->thread_intra_prefix_lsa = NULL;
+ if (oa->ospf6->gr_info.restart_in_progress) {
+ if (IS_DEBUG_OSPF6_GR)
+ zlog_debug(
+ "Graceful Restart in progress, don't originate LSA");
+ return 0;
+ }
+
/* find previous LSA */
old = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_INTRA_PREFIX), htonl(0),
oa->ospf6->router_id, oa->lsdb);
@@ -1243,6 +1273,13 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread)
assert(oi->area);
+ if (oi->area->ospf6->gr_info.restart_in_progress) {
+ if (IS_DEBUG_OSPF6_GR)
+ zlog_debug(
+ "Graceful Restart in progress, don't originate LSA");
+ return 0;
+ }
+
/* find previous LSA */
old = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_INTRA_PREFIX),
htonl(oi->interface->ifindex),