summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2018-03-27 11:07:14 +0900
committerSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2018-03-27 11:10:44 +0900
commitcab913cb45d09a4151263bb08ac7d671fdb2cf14 (patch)
tree902d8d7a5b2fe2c5fccb3fc0e175fb322edec21d /server
parentc216447b0b0819c2fab867a8e3d660aa9d66133e (diff)
server/server: Set rsRib to RS client in adding dynamic neighbor
Currently, globalRib is always set to dynamic neighbors even if they are route server clients. This patch fixes to set rsRib when the neighbor is a route server client. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Diffstat (limited to 'server')
-rw-r--r--server/server.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go
index 5c6b3ab6..e0f6f5cc 100644
--- a/server/server.go
+++ b/server/server.go
@@ -251,7 +251,11 @@ func (server *BgpServer) Serve() {
log.WithFields(log.Fields{
"Topic": "Peer",
}).Debugf("Accepted a new dynamic neighbor from:%s", remoteAddr)
- peer := newDynamicPeer(&server.bgpConfig.Global, remoteAddr, pg.Conf, server.globalRib, server.policy)
+ rib := server.globalRib
+ if pg.Conf.RouteServer.Config.RouteServerClient {
+ rib = server.rsRib
+ }
+ peer := newDynamicPeer(&server.bgpConfig.Global, remoteAddr, pg.Conf, rib, server.policy)
if peer == nil {
log.WithFields(log.Fields{
"Topic": "Peer",