summaryrefslogtreecommitdiffstats
path: root/ospf6d
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2023-03-01 21:31:56 +0100
committerRenato Westphal <renato@opensourcerouting.org>2023-03-02 23:38:03 +0100
commit5eb2c602aace233d7b0a7151f4739cc20cc6123c (patch)
tree32fe7040e81437777ebe40a95ede89fff9f55184 /ospf6d
parentospf6d: fix duplicate inter-area-prefix-LSAs after exiting from GR mode (diff)
downloadfrr-5eb2c602aace233d7b0a7151f4739cc20cc6123c.tar.xz
frr-5eb2c602aace233d7b0a7151f4739cc20cc6123c.zip
ospf6d: fix refreshing of NSSA/AS-external LSAs after a graceful restart
This commit fixes a bug where self-originated NSSA/AS-External LSAs would age out about one hour after exiting from the GR mode. The reason is because received self-originated LSAs aren't registered for periodic refreshing, so that needs to be done manually. Fix this by explicitly reoriginating all NSSA/AS-External LSAs while exiting from the GR mode. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_gr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ospf6d/ospf6_gr.c b/ospf6d/ospf6_gr.c
index 768b5e033..2e8bb025f 100644
--- a/ospf6d/ospf6_gr.c
+++ b/ospf6d/ospf6_gr.c
@@ -127,6 +127,7 @@ static void ospf6_gr_restart_exit(struct ospf6 *ospf6, const char *reason)
{
struct ospf6_area *area;
struct listnode *onode, *anode;
+ struct ospf6_route *route;
if (IS_DEBUG_OSPF6_GR)
zlog_debug("GR: exiting graceful restart: %s", reason);
@@ -163,6 +164,16 @@ static void ospf6_gr_restart_exit(struct ospf6 *ospf6, const char *reason)
}
/*
+ * While all self-originated NSSA and AS-external LSAs were already
+ * learned from the helping neighbors, we need to reoriginate them in
+ * order to ensure they will be refreshed periodically.
+ */
+ for (route = ospf6_route_head(ospf6->external_table); route;
+ route = ospf6_route_next(route))
+ ospf6_handle_external_lsa_origination(ospf6, route,
+ &route->prefix);
+
+ /*
* 3) The router reruns its OSPF routing calculations, this time
* installing the results into the system forwarding table, and
* originating summary-LSAs, Type-7 LSAs and AS-external-LSAs as