diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-11-07 13:36:39 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-11-07 17:29:07 +0900 |
commit | 433440067d8084556a31ffd4b8bfa8671bfcaab2 (patch) | |
tree | e88c182767005c70fa9f3d2d6b901a0e186c668f /pkg/server/peer.go | |
parent | 5ab45752ce5a7dbbb16f357f8d405fb272eab512 (diff) |
server: fix isIBGPPeer() to handle local-as configuration
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'pkg/server/peer.go')
-rw-r--r-- | pkg/server/peer.go | 4 |
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 { |