[PATCH 2.x branch] BGP: Bind listen socket to VRF

Alexander Zubkov green at qrator.net
Fri Oct 26 12:03:57 CEST 2018


BGP protocol could not bind to the interface in a VRF
even if the vrf option was specified in the configuration.

Signed-off-by: Alexander Zubkov <green at qrator.net>
---
 proto/bgp/bgp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index e7479df..3aa35ae 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -168,6 +168,7 @@ bgp_open(struct bgp_proto *p)
 
   sock *sk = sk_new(proto_pool);
   sk->type = SK_TCP_PASSIVE;
+  sk->vrf = p->p.vrf;
   sk->ttl = 255;
   sk->saddr = addr;
   sk->sport = port;
-- 
1.9.1


More information about the Bird-users mailing list