mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-17 16:48:43 +00:00
Bug in (B)DR election fixed.
This commit is contained in:
parent
d9f89e0114
commit
28950169e7
@ -349,11 +349,31 @@ bdr_election(struct ospf_iface *ifa, struct proto *p)
|
|||||||
doadj=0;
|
doadj=0;
|
||||||
if((ifa->drid!=ndrid) || (ifa->bdrid!=nbdrid)) doadj=1;
|
if((ifa->drid!=ndrid) || (ifa->bdrid!=nbdrid)) doadj=1;
|
||||||
ifa->drid=ndrid;
|
ifa->drid=ndrid;
|
||||||
if((tmp=find_neigh(ifa,ndrid))==NULL) die("Error i BDR election.\n");
|
if(ndrid==0)
|
||||||
ifa->drip=tmp->ip;
|
{
|
||||||
ifa->bdrid=nbdrid;
|
ifa->drid=0;
|
||||||
if((tmp=find_neigh(ifa,nbdrid))==NULL) die("Error i BDR election.\n");
|
ifa->drip=ipa_from_u32(0);
|
||||||
ifa->bdrip=tmp->ip;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if((tmp=find_neigh(ifa,ndrid))==NULL)
|
||||||
|
die("Error in DR election.\n");
|
||||||
|
ifa->drid=ndrid;
|
||||||
|
ifa->drip=tmp->ip;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nbdrid==0)
|
||||||
|
{
|
||||||
|
ifa->bdrid=0;
|
||||||
|
ifa->bdrip=ipa_from_u32(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if((tmp=find_neigh(ifa,nbdrid))==NULL)
|
||||||
|
die("Error in BDR election.\n");
|
||||||
|
ifa->bdrid=nbdrid;
|
||||||
|
ifa->bdrip=tmp->ip;
|
||||||
|
}
|
||||||
|
|
||||||
DBG("%s: DR=%I, BDR=%I\n",p->name, ifa->drid, ifa->bdrid);
|
DBG("%s: DR=%I, BDR=%I\n",p->name, ifa->drid, ifa->bdrid);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user