mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 09:41:46 +00:00
2005-11-20 Paul Jakma <paul.jakma@sun.com>
* ospfd.h: remove the OSPF_ROUTER_ID_UPDATE_DELAY define (struct ospf) remove the router_id timer thread. remove export of ospf_router_id_update_timer. * ospfd.c: (ospf_router_id_update) call ospf_if_update to poke interfaces into action after ID has been configured. (ospf_router_id_update_timer) removed. (ospf_finish_final) t_router_id_update timer is gone. (ospf_network_run) router-id update timer gone. call ospf_router_id_update directly if ID not configured. In the per-iface loop, don't ospf_if_up interfaces if ID is still not configured. The update function will call ospf_if_update anyway. (ospf_if_update) ID update timer is gone. Just return if no ID is set. * ospf_vty.c: (ospf_router_id) call ospf_router_id_update, no timer needed. * ospf_zebra.c: (ospf_router_id_update_zebra) call ospf_router_id_update directly, not via timer.
This commit is contained in:
parent
77b1cffe3b
commit
b29800a676
@ -1,3 +1,24 @@
|
||||
2005-11-20 Paul Jakma <paul.jakma@sun.com>
|
||||
|
||||
* ospfd.h: remove the OSPF_ROUTER_ID_UPDATE_DELAY define
|
||||
(struct ospf) remove the router_id timer thread.
|
||||
remove export of ospf_router_id_update_timer.
|
||||
* ospfd.c: (ospf_router_id_update) call ospf_if_update to
|
||||
poke interfaces into action after ID has been configured.
|
||||
(ospf_router_id_update_timer) removed.
|
||||
(ospf_finish_final) t_router_id_update timer is gone.
|
||||
(ospf_network_run) router-id update timer gone.
|
||||
call ospf_router_id_update directly if ID not configured.
|
||||
In the per-iface loop, don't ospf_if_up interfaces if
|
||||
ID is still not configured. The update function will call
|
||||
ospf_if_update anyway.
|
||||
(ospf_if_update) ID update timer is gone. Just return if no
|
||||
ID is set.
|
||||
* ospf_vty.c: (ospf_router_id) call ospf_router_id_update, no
|
||||
timer needed.
|
||||
* ospf_zebra.c: (ospf_router_id_update_zebra) call
|
||||
ospf_router_id_update directly, not via timer.
|
||||
|
||||
2005-11-16 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||
|
||||
* ospf_dump.h: Define OSPF_TIME_DUMP_SIZE as appropriate buffer size
|
||||
|
@ -215,11 +215,9 @@ DEFUN (ospf_router_id,
|
||||
}
|
||||
|
||||
ospf->router_id_static = router_id;
|
||||
|
||||
if (ospf->t_router_id_update == NULL)
|
||||
OSPF_TIMER_ON (ospf->t_router_id_update, ospf_router_id_update_timer,
|
||||
OSPF_ROUTER_ID_UPDATE_DELAY);
|
||||
|
||||
|
||||
ospf_router_id_update (ospf);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -68,12 +68,10 @@ ospf_router_id_update_zebra (int command, struct zclient *zclient,
|
||||
router_id_zebra = router_id.u.prefix4;
|
||||
|
||||
ospf = ospf_lookup ();
|
||||
|
||||
if (ospf != NULL)
|
||||
{
|
||||
if (ospf->t_router_id_update == NULL)
|
||||
OSPF_TIMER_ON (ospf->t_router_id_update, ospf_router_id_update_timer,
|
||||
OSPF_ROUTER_ID_UPDATE_DELAY);
|
||||
}
|
||||
ospf_router_id_update (ospf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -119,22 +119,11 @@ ospf_router_id_update (struct ospf *ospf)
|
||||
|
||||
OSPF_TIMER_ON (ospf->t_router_lsa_update,
|
||||
ospf_router_lsa_update_timer, OSPF_LSA_UPDATE_DELAY);
|
||||
|
||||
/* update ospf_interface's */
|
||||
ospf_if_update (ospf);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ospf_router_id_update_timer (struct thread *thread)
|
||||
{
|
||||
struct ospf *ospf = THREAD_ARG (thread);
|
||||
|
||||
if (IS_DEBUG_OSPF_EVENT)
|
||||
zlog_debug ("Router-ID: Update timer fired!");
|
||||
|
||||
ospf->t_router_id_update = NULL;
|
||||
ospf_router_id_update (ospf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* For OSPF area sort by area id. */
|
||||
static int
|
||||
@ -454,7 +443,6 @@ ospf_finish_final (struct ospf *ospf)
|
||||
|
||||
/* Cancel all timers. */
|
||||
OSPF_TIMER_OFF (ospf->t_external_lsa);
|
||||
OSPF_TIMER_OFF (ospf->t_router_id_update);
|
||||
OSPF_TIMER_OFF (ospf->t_router_lsa_update);
|
||||
OSPF_TIMER_OFF (ospf->t_spf_calc);
|
||||
OSPF_TIMER_OFF (ospf->t_ase_calc);
|
||||
@ -834,12 +822,8 @@ ospf_network_run (struct ospf *ospf, struct prefix *p, struct ospf_area *area)
|
||||
|
||||
/* Schedule Router ID Update. */
|
||||
if (ospf->router_id_static.s_addr == 0)
|
||||
if (ospf->t_router_id_update == NULL)
|
||||
{
|
||||
OSPF_TIMER_ON (ospf->t_router_id_update, ospf_router_id_update_timer,
|
||||
OSPF_ROUTER_ID_UPDATE_DELAY);
|
||||
}
|
||||
|
||||
ospf_router_id_update (ospf);
|
||||
|
||||
/* Get target interface. */
|
||||
for (ALL_LIST_ELEMENTS_RO (om->iflist, node, ifp))
|
||||
{
|
||||
@ -913,8 +897,14 @@ ospf_network_run (struct ospf *ospf, struct prefix *p, struct ospf_area *area)
|
||||
}
|
||||
|
||||
ospf_area_add_if (oi->area, oi);
|
||||
|
||||
if (if_is_operative (ifp))
|
||||
|
||||
/* if router_id is not configured, dont bring up
|
||||
* interfaces.
|
||||
* ospf_router_id_update() will call ospf_if_update
|
||||
* whenever r-id is configured instead.
|
||||
*/
|
||||
if ((ospf->router_id_static.s_addr != 0)
|
||||
&& if_is_operative (ifp))
|
||||
ospf_if_up (oi);
|
||||
|
||||
break;
|
||||
@ -961,15 +951,10 @@ ospf_if_update (struct ospf *ospf)
|
||||
|
||||
if (ospf != NULL)
|
||||
{
|
||||
/* Update Router ID scheduled. */
|
||||
/* Router-ID must be configured. */
|
||||
if (ospf->router_id_static.s_addr == 0)
|
||||
if (ospf->t_router_id_update == NULL)
|
||||
{
|
||||
OSPF_TIMER_ON (ospf->t_router_id_update,
|
||||
ospf_router_id_update_timer,
|
||||
OSPF_ROUTER_ID_UPDATE_DELAY);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
/* Find interfaces that not configured already. */
|
||||
for (ALL_LIST_ELEMENTS (ospf->oiflist, node, nnode, oi))
|
||||
{
|
||||
|
@ -126,9 +126,6 @@
|
||||
#define OSPF_DD_FLAG_I 0x04
|
||||
#define OSPF_DD_FLAG_ALL 0x07
|
||||
|
||||
/* Timer value. */
|
||||
#define OSPF_ROUTER_ID_UPDATE_DELAY 1
|
||||
|
||||
#define OSPF_LS_REFRESH_SHIFT (60 * 15)
|
||||
#define OSPF_LS_REFRESH_JITTER 60
|
||||
|
||||
@ -249,7 +246,6 @@ struct ospf
|
||||
int redistribute; /* Num of redistributed protocols. */
|
||||
|
||||
/* Threads. */
|
||||
struct thread *t_router_id_update; /* Router ID update timer. */
|
||||
struct thread *t_router_lsa_update; /* router-LSA update timer. */
|
||||
struct thread *t_abr_task; /* ABR task timer. */
|
||||
struct thread *t_asbr_check; /* ASBR check timer. */
|
||||
@ -555,7 +551,6 @@ extern const char *ospf_redist_string(u_int route_type);
|
||||
extern struct ospf *ospf_lookup (void);
|
||||
extern struct ospf *ospf_get (void);
|
||||
extern void ospf_finish (struct ospf *);
|
||||
extern int ospf_router_id_update_timer (struct thread *);
|
||||
extern void ospf_router_id_update (struct ospf *ospf);
|
||||
extern int ospf_network_match_iface (struct connected *, struct prefix *);
|
||||
extern int ospf_network_set (struct ospf *, struct prefix_ipv4 *,
|
||||
|
Loading…
Reference in New Issue
Block a user