From: Ondrej Zajicek (work) Date: Tue, 17 Sep 2019 12:45:14 +0000 (+0200) Subject: BGP: Fix setup with multiple dynamic BGP ranges X-Git-Tag: v2.0.7~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb1e43a9af9e1905b754f1f191d228e2676ce181;p=thirdparty%2Fbird.git BGP: Fix setup with multiple dynamic BGP ranges Based on a patch from Liam Nattrass, thanks. --- diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index b26e5e871..d6c2b7e46 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -1551,6 +1551,14 @@ bgp_start(struct proto *P) lock->type = OBJLOCK_TCP; lock->hook = bgp_start_locked; 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); return PS_START;