]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospfd : Resolving conflict in distribute-list update during MaxAge LSA.
authorKaushik <kaushik@niralnetworks.com>
Thu, 10 Sep 2020 08:58:56 +0000 (01:58 -0700)
committerKaushik <kaushik@niralnetworks.com>
Sat, 12 Sep 2020 13:24:30 +0000 (06:24 -0700)
1. Fix for duplicating calls of ospf_external_lsa_refresh()
   in ospf_distribute_list_update_timer().
2. Added the comment and change from PR 6981.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
ospfd/ospf_zebra.c

index 0487ace301cb049453f7195136037c9281563516..dc8a8dccd25c681eb6fbc35a1df9449144ec75e5 100644 (file)
@@ -1355,16 +1355,26 @@ static int ospf_distribute_list_update_timer(struct thread *thread)
                                        else if (
                                                (lsa = ospf_external_info_find_lsa(
                                                         ospf, &ei->p))) {
-                                               if (!CHECK_FLAG(
-                                                           lsa->flags,
-                                                           OSPF_LSA_IN_MAXAGE))
-                                                       ospf_external_lsa_refresh(
-                                                               ospf, lsa, ei,
-                                                               LSA_REFRESH_IF_CHANGED);
-                                               else
-                                                       ospf_external_lsa_refresh(
-                                                               ospf, lsa, ei,
-                                                               LSA_REFRESH_FORCE);
+                                               int force =
+                                                       LSA_REFRESH_IF_CHANGED;
+                                               /* If this is a MaxAge LSA, we
+                                                * need to force refresh it
+                                                * because distribute settings
+                                                * might have changed and now,
+                                                * this LSA needs to be
+                                                * originated, not be removed.
+                                                * If we don't force refresh it,
+                                                * it will remain a MaxAge LSA
+                                                * because it will look like it
+                                                * hasn't changed. Neighbors
+                                                * will not receive updates for
+                                                * this LSA.
+                                                */
+                                               if (IS_LSA_MAXAGE(lsa))
+                                                       force = LSA_REFRESH_FORCE;
+
+                                               ospf_external_lsa_refresh(
+                                                       ospf, lsa, ei, force);
                                        } else
                                                ospf_external_lsa_originate(
                                                        ospf, ei);