summaryrefslogtreecommitdiffstats
path: root/proto/ospf/neighbor.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-08-25 16:42:14 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-08-25 16:42:14 +0200
commitb49e6f5a65d437cb7e7bdefe8397e0f550496012 (patch)
tree21e0f77023119de17ea8ab6ab7871b1026db92e6 /proto/ospf/neighbor.c
parentc3226991a061415fa83b757cbff678111c586e58 (diff)
downloadbird-b49e6f5a65d437cb7e7bdefe8397e0f550496012.tar
bird-b49e6f5a65d437cb7e7bdefe8397e0f550496012.zip
Temporary OSPFv3 development commit
Diffstat (limited to 'proto/ospf/neighbor.c')
-rw-r--r--proto/ospf/neighbor.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c
index d86895e..374da63 100644
--- a/proto/ospf/neighbor.c
+++ b/proto/ospf/neighbor.c
@@ -173,16 +173,16 @@ electbdr(list nl)
struct ospf_neighbor *neigh, *n1, *n2;
u32 nid;
-#ifdef OSPFv2
- nid = ipa_to_u32(neigh->ip);
-#else /* OSPFv3 */
- nid = neigh->rid;
-#endif
-
n1 = NULL;
n2 = NULL;
WALK_LIST(neigh, nl) /* First try those decl. themselves */
{
+#ifdef OSPFv2
+ nid = ipa_to_u32(neigh->ip);
+#else /* OSPFv3 */
+ nid = neigh->rid;
+#endif
+
if (neigh->state >= NEIGHBOR_2WAY) /* Higher than 2WAY */
if (neigh->priority > 0) /* Eligible */
if (neigh->dr != nid) /* And not decl. itself DR */
@@ -231,15 +231,15 @@ electdr(list nl)
struct ospf_neighbor *neigh, *n;
u32 nid;
+ n = NULL;
+ WALK_LIST(neigh, nl) /* And now DR */
+ {
#ifdef OSPFv2
- nid = ipa_to_u32(neigh->ip);
+ nid = ipa_to_u32(neigh->ip);
#else /* OSPFv3 */
- nid = neigh->rid;
+ nid = neigh->rid;
#endif
- n = NULL;
- WALK_LIST(neigh, nl) /* And now DR */
- {
if (neigh->state >= NEIGHBOR_2WAY) /* Higher than 2WAY */
if (neigh->priority > 0) /* Eligible */
if (neigh->dr == nid) /* And declaring itself DR */