]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6_spf.c
ospf6d: introduce support for Graceful Restart (restarting mode)
[mirror_frr.git] / ospf6d / ospf6_spf.c
index a27ca092b8586f54b7fd0c9db7e58bc00c762cb2..e4de6ccf910b1125f71b7e2dcab6e4bfaa814038 100644 (file)
@@ -44,6 +44,7 @@
 #include "ospf6d.h"
 #include "ospf6_abr.h"
 #include "ospf6_nssa.h"
+#include "ospf6_zebra.h"
 
 DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_VERTEX, "OSPF6 vertex");
 
@@ -438,8 +439,8 @@ void ospf6_spf_table_finish(struct ospf6_route_table *result_table)
        }
 }
 
-static const char *const ospf6_spf_reason_str[] = {"R+", "R-", "N+", "N-", "L+",
-                                                  "L-", "R*", "N*", "C",  "A"};
+static const char *const ospf6_spf_reason_str[] = {
+       "R+", "R-", "N+", "N-", "L+", "L-", "R*", "N*", "C", "A", "GR"};
 
 void ospf6_spf_reason_string(unsigned int reason, char *buf, int size)
 {
@@ -1255,6 +1256,17 @@ static int ospf6_ase_calculate_timer(struct thread *t)
                                ospf6_ase_calculate_route(ospf6, lsa, area);
                }
        }
+
+       if (ospf6->gr_info.finishing_restart) {
+               /*
+                * The routing table computation is complete. Uninstall remnant
+                * routes that were installed before the restart, but that are
+                * no longer valid.
+                */
+               ospf6_zebra_gr_disable(ospf6);
+               ospf6->gr_info.finishing_restart = false;
+       }
+
        return 0;
 }