version 1.1.1.1, 2012/02/21 17:26:12
|
version 1.1.1.3, 2016/11/02 10:09:12
|
Line 44
|
Line 44
|
#include "ospfd/ospf_flood.h" |
#include "ospfd/ospf_flood.h" |
#include "ospfd/ospf_abr.h" |
#include "ospfd/ospf_abr.h" |
#include "ospfd/ospf_snmp.h" |
#include "ospfd/ospf_snmp.h" |
| |
/* elect DR and BDR. Refer to RFC2319 section 9.4 */ |
/* elect DR and BDR. Refer to RFC2319 section 9.4 */ |
static struct ospf_neighbor * |
static struct ospf_neighbor * |
ospf_dr_election_sub (struct list *routers) |
ospf_dr_election_sub (struct list *routers) |
Line 203 ospf_dr_election (struct ospf_interface *oi)
|
Line 203 ospf_dr_election (struct ospf_interface *oi)
|
struct in_addr old_dr, old_bdr; |
struct in_addr old_dr, old_bdr; |
int old_state, new_state; |
int old_state, new_state; |
struct list *el_list; |
struct list *el_list; |
struct ospf_neighbor *dr, *bdr; |
|
|
|
/* backup current values. */ |
/* backup current values. */ |
old_dr = DR (oi); |
old_dr = DR (oi); |
Line 216 ospf_dr_election (struct ospf_interface *oi)
|
Line 215 ospf_dr_election (struct ospf_interface *oi)
|
ospf_dr_eligible_routers (oi->nbrs, el_list); |
ospf_dr_eligible_routers (oi->nbrs, el_list); |
|
|
/* First election of DR and BDR. */ |
/* First election of DR and BDR. */ |
bdr = ospf_elect_bdr (oi, el_list); | ospf_elect_bdr (oi, el_list); |
dr = ospf_elect_dr (oi, el_list); | ospf_elect_dr (oi, el_list); |
|
|
new_state = ospf_ism_state (oi); |
new_state = ospf_ism_state (oi); |
|
|
Line 246 ospf_dr_election (struct ospf_interface *oi)
|
Line 245 ospf_dr_election (struct ospf_interface *oi)
|
return new_state; |
return new_state; |
} |
} |
|
|
| |
int |
int |
ospf_hello_timer (struct thread *thread) |
ospf_hello_timer (struct thread *thread) |
{ |
{ |
Line 594 ism_change_state (struct ospf_interface *oi, int state
|
Line 593 ism_change_state (struct ospf_interface *oi, int state
|
oi->network_lsa_self = NULL; |
oi->network_lsa_self = NULL; |
} |
} |
|
|
#ifdef HAVE_OPAQUE_LSA |
|
ospf_opaque_ism_change (oi, old_state); |
ospf_opaque_ism_change (oi, old_state); |
#endif /* HAVE_OPAQUE_LSA */ |
|
|
|
/* Check area border status. */ |
/* Check area border status. */ |
ospf_check_abr_status (oi->ospf); |
ospf_check_abr_status (oi->ospf); |