summaryrefslogtreecommitdiffstats
path: root/proto/ospf/neighbor.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/ospf/neighbor.c')
-rw-r--r--proto/ospf/neighbor.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c
index aa7bc2f..ba8d7b9 100644
--- a/proto/ospf/neighbor.c
+++ b/proto/ospf/neighbor.c
@@ -439,15 +439,14 @@ ospf_neigh_sm(struct ospf_neighbor *n, int event)
void
bdr_election(struct ospf_iface *ifa)
{
+ struct proto_ospf *po = ifa->oa->po;
+ struct proto *p = &po->proto;
+ u32 myid = po->router_id;
struct ospf_neighbor *neigh, *ndr, *nbdr, me;
- u32 myid;
int doadj;
- struct proto *p = &ifa->oa->po->proto;
DBG("(B)DR election.\n");
- myid = p->cf->global->router_id;
-
me.state = NEIGHBOR_2WAY;
me.rid = myid;
me.priority = ifa->priority;