]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: Only refresh external default route once.
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>
Wed, 14 Apr 2010 14:01:25 +0000 (16:01 +0200)
committerGreg Troxel <gdt@ir.bbn.com>
Sun, 18 Apr 2010 18:56:41 +0000 (14:56 -0400)
* ospf_zebra.c: (ospf_distribute_list_update_timer) forces a
  refresh of default route each time it finds a default prefix.
  This is suboptimal, just record that it needs to be done and
  do it once.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
ospfd/ospf_zebra.c

index 462f67c819bf2afc479e2e2801d229972785224b..50ca85e167021e0a73a0fb24005b6b0bd3090891 100644 (file)
@@ -929,7 +929,7 @@ ospf_distribute_list_update_timer (struct thread *thread)
   struct external_info *ei;
   struct route_table *rt;
   struct ospf_lsa *lsa;
-  int type;
+  int type, default_refresh = 0;
   struct ospf *ospf;
 
   ospf = ospf_lookup ();
@@ -950,13 +950,15 @@ ospf_distribute_list_update_timer (struct thread *thread)
        if ((ei = rn->info) != NULL)
          {
            if (is_prefix_default (&ei->p))
-             ospf_external_lsa_refresh_default (ospf);
+             default_refresh = 1;
            else if ((lsa = ospf_external_info_find_lsa (ospf, &ei->p)))
              ospf_external_lsa_refresh (ospf, lsa, ei, LSA_REFRESH_IF_CHANGED);
            else
              ospf_external_lsa_originate (ospf, ei);
          }
     }
+  if (default_refresh)
+    ospf_external_lsa_refresh_default (ospf);
   return 0;
 }