]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
OSPF: DD seqnum should be initialized only for first attempts
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Sun, 3 Feb 2019 15:20:37 +0000 (16:20 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Sun, 3 Feb 2019 15:20:37 +0000 (16:20 +0100)
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.

proto/ospf/neighbor.c
proto/ospf/ospf.h

index 7ce682b0ab2a7ddcd155d0459b38eac36d89315d..54d643c65e550f9b87254627a988d4c0175cc928 100644 (file)
@@ -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++;
index 22b87ebe5cc39a42b6e9d547e0521fc0ca3516b0..23289ccd503c88c4f4d73abfaa9705eeb240b320 100644 (file)
@@ -353,7 +353,6 @@ struct ospf_neighbor
   u32 rid;                     /* Router ID */
   ip_addr ip;                  /* IP of it's interface */
   u8 priority;                 /* Priority */
-  u8 adj;                      /* built adjacency? */
   u32 options;                 /* Options received */
 
   /* Entries dr and bdr store IP addresses in OSPFv2 and router IDs in