]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: Remove dup MaxAge LSA flood
authorDinesh G Dutt <ddutt@cumulusnetworks.com>
Mon, 7 Jan 2013 18:12:52 +0000 (10:12 -0800)
committerScott Feldman <sfeldma@cumulusnetworks.com>
Mon, 7 Jan 2013 18:12:52 +0000 (10:12 -0800)
Stop additional, unnecessary flooding of MaxAge LSAs.

When a MaxAge LSA is installed, if the LSA is prematurely aged or the LSA is
not self-originated, the LSA is flushed. This results in a the LSA being
flooded a second time and in some cases flooded back to the receiver
(unless the receiver is also the advertising router). A MaxAge'd LSA has
already been flooded in ospf_flood() as part of the LSA receive processing
(ospf_ls_upd). A self-originated LSA will be flooded from the originate/refresh
routine. Thus, in the install routine, a MaxAge'd LSA only needs to be added
to the MaxAge LSA list.

Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
ospfd/ospf_lsa.c

index 4f7fb00aaca5bcbe0f9e7b6eb5e11feee8a1f461..dfd1a61e2a3e84efef20a28ba3983b98bccc74cb 100644 (file)
@@ -2780,15 +2780,14 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi,
      If received LSA' ls_age is MaxAge, or lsa is being prematurely aged
      (it's getting flushed out of the area), set LSA on MaxAge LSA list. 
    */
-  if ((lsa->flags & OSPF_LSA_PREMATURE_AGE) ||
-      (IS_LSA_MAXAGE (new) && !IS_LSA_SELF (new)))
+  if (IS_LSA_MAXAGE (new))
     {
       if (IS_DEBUG_OSPF (lsa, LSA_INSTALL))
         zlog_debug ("LSA[Type%d:%s]: Install LSA 0x%p, MaxAge",
                    new->data->type, 
                    inet_ntoa (new->data->id), 
                    lsa);
-      ospf_lsa_flush (ospf, lsa);
+      ospf_lsa_maxage (ospf, lsa);
     }
 
   return new;