summaryrefslogtreecommitdiff
path: root/ospfd/ospfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r--ospfd/ospfd.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index a64ddbc3b7..b91a55f635 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -91,7 +91,6 @@ void ospf_router_id_update(struct ospf *ospf)
struct ospf_interface *oi;
struct interface *ifp;
struct listnode *node;
- int type;
if (!ospf->oi_running) {
if (IS_DEBUG_OSPF_EVENT)
@@ -135,24 +134,6 @@ void ospf_router_id_update(struct ospf *ospf)
ospf_nbr_self_reset(oi, router_id);
}
- /* If AS-external-LSA is queued, then flush those LSAs. */
- if (router_id_old.s_addr == 0 && ospf->external_origin) {
- /* Originate each redistributed external route. */
- for (type = 0; type < ZEBRA_ROUTE_MAX; type++)
- if (ospf->external_origin & (1 << type))
- thread_add_event(
- master,
- ospf_external_lsa_originate_timer,
- ospf, type, NULL);
- /* Originate Deafult. */
- if (ospf->external_origin & (1 << ZEBRA_ROUTE_MAX))
- thread_add_event(master,
- ospf_default_originate_timer,
- ospf, 0, NULL);
-
- ospf->external_origin = 0;
- }
-
/* Flush (inline) all external LSAs based on the OSPF_LSA_SELF
* flag */
if (ospf->lsdb) {
@@ -196,20 +177,14 @@ void ospf_router_id_update(struct ospf *ospf)
}
}
- /* Originate each redistributed external route. */
- for (type = 0; type < ZEBRA_ROUTE_MAX; type++)
- thread_add_event(master,
- ospf_external_lsa_originate_timer,
- ospf, type, NULL);
- thread_add_event(master, ospf_default_originate_timer, ospf, 0,
- NULL);
-
/* update router-lsa's for each area */
ospf_router_lsa_update(ospf);
/* update ospf_interface's */
FOR_ALL_INTERFACES (vrf, ifp)
ospf_if_update(ospf, ifp);
+
+ ospf_external_lsa_rid_change(ospf);
}
}
@@ -633,7 +608,7 @@ static void ospf_finish_final(struct ospf *ospf)
ospf_redist_del(ospf, i, red->instance);
}
}
- ospf_redistribute_default_unset(ospf);
+ ospf_redistribute_default_set(ospf, DEFAULT_ORIGINATE_NONE, 0, 0);
for (ALL_LIST_ELEMENTS(ospf->areas, node, nnode, area))
ospf_remove_vls_through_area(ospf, area);
@@ -702,7 +677,6 @@ static void ospf_finish_final(struct ospf *ospf)
/* Cancel all timers. */
OSPF_TIMER_OFF(ospf->t_read);
OSPF_TIMER_OFF(ospf->t_write);
- OSPF_TIMER_OFF(ospf->t_external_lsa);
OSPF_TIMER_OFF(ospf->t_spf_calc);
OSPF_TIMER_OFF(ospf->t_ase_calc);
OSPF_TIMER_OFF(ospf->t_maxage);