summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-11 01:41:52 +0200
committerOndrej Filip <feela@network.cz>2000-05-11 01:41:52 +0200
commit74ac7cdb1afe1e23a130b290f4a366268073f62c (patch)
treeabd91ff2f8a386d5b2ef79387d757fa1d8b97acb
parentff73f1d63d2d1e49737ea2471dc5cb92e9591847 (diff)
downloadbird-74ac7cdb1afe1e23a130b290f4a366268073f62c.tar
bird-74ac7cdb1afe1e23a130b290f4a366268073f62c.zip
Bugfix in (B)DR election.
-rw-r--r--proto/ospf/neighbor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c
index 479b0f8..1e9ebee 100644
--- a/proto/ospf/neighbor.c
+++ b/proto/ospf/neighbor.c
@@ -316,12 +316,12 @@ bdr_election(struct ospf_iface *ifa, struct proto *p)
nbdr=electbdr(ifa->neigh_list);
ndr=electdr(ifa->neigh_list);
- if(ndr==NULL) ndr=nbdr;
+ if(ndr==NULL) ndr=nbdr; /* FIXME is this correct? */
- if(((ifa->drid==myid) && (ndr->rid!=myid))
- || ((ifa->drid!=myid) && (ndr->rid==myid))
- || ((ifa->bdrid==myid) && (nbdr->rid!=myid))
- || ((ifa->bdrid!=myid) && (nbdr->rid==myid)))
+ if(((ifa->drid==myid) && (ndr!=&me))
+ || ((ifa->drid!=myid) && (ndr==&me))
+ || ((ifa->bdrid==myid) && (nbdr!=&me))
+ || ((ifa->bdrid!=myid) && (nbdr==&me)))
{
if(ndr==NULL) ifa->drid=me.dr=0;
else ifa->drid=me.dr=ndr->rid;