diff options
author | Ondrej Filip <feela@network.cz> | 1999-08-09 20:11:51 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 1999-08-09 20:11:51 +0200 |
commit | b1693b8f749ccc683a2a78dc3129e56e500bc73f (patch) | |
tree | 5c00940b0d9173fefde4998abe2d1b6ce11360a6 /proto/ospf/ospf.c | |
parent | e83dc0d7e78fd31b435b36424beb790bf55881a8 (diff) | |
download | bird-b1693b8f749ccc683a2a78dc3129e56e500bc73f.tar bird-b1693b8f749ccc683a2a78dc3129e56e500bc73f.zip |
Bug in election fixed.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r-- | proto/ospf/ospf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index a435686..48c6e03 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -149,6 +149,9 @@ backupseen(struct ospf_iface *ifa) p=(struct proto *)(ifa->proto); + tm_stop(ifa->wait_timer); + DBG("%s: Stoping wait timer\n",p->name); + DBG("%s: (B)DR election.\n",p->name); myid=p->cf->global->router_id; @@ -166,10 +169,10 @@ backupseen(struct ospf_iface *ifa) if(ndr==NULL) ndr=nbdr; - if(((ifa->drid==myid) && (ndr!=myid)) - || ((ifa->drid!=myid) && (ndr==myid)) - || ((ifa->bdrid==myid) && (nbdr!=myid)) - || ((ifa->bdrid!=myid) && (nbdr==myid))) + 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(ndr==NULL) ifa->drid=me.dr=0; else ifa->drid=me.dr=ndr->rid; @@ -188,9 +191,6 @@ backupseen(struct ospf_iface *ifa) DBG("%s: DR=%u, BDR=%u\n",p->name, ifa->drid, ifa->bdrid); - tm_stop(ifa->wait_timer); - DBG("%s: Stoping wait timer\n",p->name); - if(myid==ifa->drid) iface_chstate(ifa, OSPF_IS_DR); else { |