summaryrefslogtreecommitdiff
path: root/ospfd/ospf_zebra.c
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2010-04-14 16:01:25 +0200
committerGreg Troxel <gdt@ir.bbn.com>2010-04-18 14:56:41 -0400
commit46154fe3675df5417a712285b66fd12bd1b4fc6d (patch)
treef661aa3353d2130100746ce9819b596c27895bc4 /ospfd/ospf_zebra.c
parent45acaa0a4cbb4b61c1e4cfcc8f8a534f4fdccfe5 (diff)
ospfd: Only refresh external default route once.
* 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>
Diffstat (limited to 'ospfd/ospf_zebra.c')
-rw-r--r--ospfd/ospf_zebra.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 462f67c8..50ca85e1 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -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;
}