summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/peer.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@gmail.com>2019-04-01 21:22:11 +0900
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2019-04-02 16:01:29 +0900
commitccdc2e6277020e571da7792c1d9e76cf13e82f44 (patch)
treec3df5db11d72ec9a2314ba41bfccc9ea9fd47feb /pkg/server/peer.go
parent805d02fdfbc5092ef7a676b1c3a63dfb32571b47 (diff)
add secondary-route feature for router server
if an export policy rejects a selected route, try the next route in order until one that is accepted is found or all routes for the peer are rejected. the default is disabled. You can enable this feature in the following way: [neighbors.route-server.config] route-server-client = true secondary-route = true Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'pkg/server/peer.go')
-rw-r--r--pkg/server/peer.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/server/peer.go b/pkg/server/peer.go
index d7fb46c3..910c7472 100644
--- a/pkg/server/peer.go
+++ b/pkg/server/peer.go
@@ -147,6 +147,12 @@ func (peer *peer) isRouteServerClient() bool {
return peer.fsm.pConf.RouteServer.Config.RouteServerClient
}
+func (peer *peer) isSecondaryRouteEnabled() bool {
+ peer.fsm.lock.RLock()
+ defer peer.fsm.lock.RUnlock()
+ return peer.fsm.pConf.RouteServer.Config.RouteServerClient && peer.fsm.pConf.RouteServer.Config.SecondaryRoute
+}
+
func (peer *peer) isRouteReflectorClient() bool {
peer.fsm.lock.RLock()
defer peer.fsm.lock.RUnlock()