diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2009-08-25 16:42:14 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2009-08-25 16:42:14 +0200 |
commit | b49e6f5a65d437cb7e7bdefe8397e0f550496012 (patch) | |
tree | 21e0f77023119de17ea8ab6ab7871b1026db92e6 /proto/ospf/neighbor.c | |
parent | c3226991a061415fa83b757cbff678111c586e58 (diff) |
Temporary OSPFv3 development commit
Diffstat (limited to 'proto/ospf/neighbor.c')
-rw-r--r-- | proto/ospf/neighbor.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index d86895ed..374da636 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 */ |