summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-11-07 13:36:39 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-11-07 17:29:07 +0900
commit433440067d8084556a31ffd4b8bfa8671bfcaab2 (patch)
treee88c182767005c70fa9f3d2d6b901a0e186c668f /pkg
parent5ab45752ce5a7dbbb16f357f8d405fb272eab512 (diff)
server: fix isIBGPPeer() to handle local-as configuration
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/server/peer.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/server/peer.go b/pkg/server/peer.go
index a33287b7..6d692881 100644
--- a/pkg/server/peer.go
+++ b/pkg/server/peer.go
@@ -140,7 +140,9 @@ func (peer *peer) TableID() string {
}
func (peer *peer) isIBGPPeer() bool {
- return peer.fsm.pConf.State.PeerAs == peer.fsm.gConf.Config.As
+ peer.fsm.lock.RLock()
+ defer peer.fsm.lock.RUnlock()
+ return peer.fsm.pConf.State.PeerType == config.PEER_TYPE_INTERNAL
}
func (peer *peer) isRouteServerClient() bool {