summaryrefslogtreecommitdiffstats
path: root/proto/ospf/ospf.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>1999-08-24 16:42:51 +0200
committerOndrej Filip <feela@network.cz>1999-08-24 16:42:51 +0200
commite3121112ab8cda4b4e413a801e5626f9ffb02ca8 (patch)
tree8bd42dda3884690a78643f074788ad5c1f0c626d /proto/ospf/ospf.c
parent2981814066543b72e292b7b36ca41bfa1cc2554c (diff)
downloadbird-e3121112ab8cda4b4e413a801e5626f9ffb02ca8.tar
bird-e3121112ab8cda4b4e413a801e5626f9ffb02ca8.zip
Preparing to send DD packets.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r--proto/ospf/ospf.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 1fa33fc..47e2b78 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -44,7 +44,13 @@ tryadj(struct ospf_neighbor *n, struct proto *p)
{
DBG("%s: Going to build adjacency.\n", p->name);
neigh_chstate(n,NEIGHBOR_EXSTART);
- /* FIXME Go on */
+ if(n->adj==0) /* First time adjacency */
+ {
+ n->dds=random_u32;
+ }
+ n->dds++;
+ n->ms=NEIGHBOR_MASTER;
+ /* FIXME Go on, start to send DD packets */
}
/* Neighbor is inactive for a long time. Remove it. */
@@ -284,6 +290,7 @@ ospf_hello_rx(struct ospf_hello_packet *ps, struct proto *p,
n->priority=ps->priority;
n->options=ps->options;
n->ifa=ifa;
+ n->adj=0;
neigh_chstate(n,NEIGHBOR_INIT);
}
tm_start(n->inactim,ifa->deadc*ifa->helloint);