mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-17 08:38:42 +00:00
BGP: Fix setup with multiple dynamic BGP ranges
Based on a patch from Liam Nattrass, thanks.
This commit is contained in:
parent
5235c3f78d
commit
eb1e43a9af
@ -1551,6 +1551,14 @@ bgp_start(struct proto *P)
|
|||||||
lock->type = OBJLOCK_TCP;
|
lock->type = OBJLOCK_TCP;
|
||||||
lock->hook = bgp_start_locked;
|
lock->hook = bgp_start_locked;
|
||||||
lock->data = p;
|
lock->data = p;
|
||||||
|
|
||||||
|
/* For dynamic BGP, we use inst 1 to avoid collisions with regular BGP */
|
||||||
|
if (bgp_is_dynamic(p))
|
||||||
|
{
|
||||||
|
lock->addr = net_prefix(p->cf->remote_range);
|
||||||
|
lock->inst = 1;
|
||||||
|
}
|
||||||
|
|
||||||
olock_acquire(lock);
|
olock_acquire(lock);
|
||||||
|
|
||||||
return PS_START;
|
return PS_START;
|
||||||
|
Loading…
Reference in New Issue
Block a user