diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-21 05:51:41 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-21 05:51:41 +0900 |
commit | 81253df14f29c626110d1227b04f6cf1a090d417 (patch) | |
tree | 770aad489736d0f307e007a2d2ab10e8708b3a5e /server/server.go | |
parent | bbc852d613b008921112007b32b9c1435086d0aa (diff) |
server: set globalRib to non routeserver peer's LocalRib
TODO: fix SetDefaultPolicy()
In the case of GlobalRib, even if the default policy is set for
GlobalRib, the default policy of a peer (not configured) could
overwrite the former.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/server.go b/server/server.go index abb2c1fd..fca7f54d 100644 --- a/server/server.go +++ b/server/server.go @@ -347,8 +347,14 @@ func (server *BgpServer) Serve() { } SetTcpMD5SigSockopts(listener(config.NeighborConfig.NeighborAddress), addr, config.NeighborConfig.AuthPassword) + var loc *table.TableManager + if config.RouteServer.RouteServerConfig.RouteServerClient { + loc = table.NewTableManager(config.NeighborConfig.NeighborAddress.String(), toRFlist(config.AfiSafis.AfiSafiList), g.MplsLabelRange.MinLabel, g.MplsLabelRange.MaxLabel) + } else { + loc = server.globalRib + } + peer := NewPeer(g, config, loc) - peer := NewPeer(g, config) server.setPolicyByConfig(peer, config.ApplyPolicy) if peer.isRouteServerClient() { pathList := make([]*table.Path, 0) |