]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_abr.c
Merge pull request #11242 from patrasar/pimv6_issue_11233
[mirror_frr.git] / ospfd / ospf_abr.c
index b5c97eda3c908516156ea0f2073c04a4e64f1eca..7aa3a27c604d29d161de0469d87ce58c19f34fc9 100644 (file)
@@ -318,10 +318,29 @@ int ospf_area_range_substitute_unset(struct ospf *ospf, struct in_addr area_id,
 
 int ospf_act_bb_connection(struct ospf *ospf)
 {
+       struct ospf_interface *oi;
+       struct listnode *node;
+       int full_nbrs = 0;
+
        if (ospf->backbone == NULL)
                return 0;
 
-       return ospf->backbone->full_nbrs;
+       for (ALL_LIST_ELEMENTS_RO(ospf->backbone->oiflist, node, oi)) {
+               struct ospf_neighbor *nbr;
+               struct route_node *rn;
+
+               for (rn = route_top(oi->nbrs); rn; rn = route_next(rn)) {
+                       nbr = rn->info;
+                       if (!nbr)
+                               continue;
+
+                       if (nbr->state == NSM_Full
+                           || OSPF_GR_IS_ACTIVE_HELPER(nbr))
+                               full_nbrs++;
+               }
+       }
+
+       return full_nbrs;
 }
 
 /* Determine whether this router is elected translator or not for area */
@@ -1694,6 +1713,9 @@ static void ospf_abr_manage_discard_routes(struct ospf *ospf)
 
 static void ospf_abr_nssa_task(struct ospf *ospf) /* called only if any_nssa */
 {
+       if (ospf->gr_info.restart_in_progress)
+               return;
+
        if (IS_DEBUG_OSPF_NSSA)
                zlog_debug("Check for NSSA-ABR Tasks():");
 
@@ -1758,6 +1780,9 @@ static void ospf_abr_nssa_task(struct ospf *ospf) /* called only if any_nssa */
    summary-LSA origination and flooding. */
 void ospf_abr_task(struct ospf *ospf)
 {
+       if (ospf->gr_info.restart_in_progress)
+               return;
+
        if (IS_DEBUG_OSPF_EVENT)
                zlog_debug("ospf_abr_task(): Start");
 
@@ -1804,7 +1829,7 @@ void ospf_abr_task(struct ospf *ospf)
                zlog_debug("ospf_abr_task(): Stop");
 }
 
-static int ospf_abr_task_timer(struct thread *thread)
+static void ospf_abr_task_timer(struct thread *thread)
 {
        struct ospf *ospf = THREAD_ARG(thread);
 
@@ -1818,9 +1843,6 @@ static int ospf_abr_task_timer(struct thread *thread)
 
        ospf_abr_task(ospf);
        ospf_abr_nssa_task(ospf); /* if nssa-abr, then scan Type-7 LSDB */
-       ospf_asbr_nssa_redist_task(ospf);
-
-       return 0;
 }
 
 void ospf_schedule_abr_task(struct ospf *ospf)