diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-02-03 16:20:37 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-02-03 16:20:37 +0100 |
commit | 9c94583a3ded3b2792bd08d88beb10100a82d7b4 (patch) | |
tree | ef7ed4561da7496f6e6e79be12676fb13f8764e3 /proto/ospf/neighbor.c | |
parent | 267da8138d7f429941f2d829b44cf9bdd94a14d6 (diff) |
OSPF: DD seqnum should be initialized only for first attempts
After SeqNumberMismatch/BadLSReq, we should continue with the old
seqnum++. The old code tries to do that by n->adj, but it was set
nowhere.
Diffstat (limited to 'proto/ospf/neighbor.c')
-rw-r--r-- | proto/ospf/neighbor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index 7ce682b0..54d643c6 100644 --- a/proto/ospf/neighbor.c +++ b/proto/ospf/neighbor.c @@ -176,8 +176,8 @@ ospf_neigh_chstate(struct ospf_neighbor *n, u8 state) if (state == NEIGHBOR_EXSTART) { - /* First time adjacency */ - if (n->adj == 0) + /* First time adjacency attempt */ + if (old_state < NEIGHBOR_EXSTART) n->dds = random_u32(); n->dds++; |