From 433440067d8084556a31ffd4b8bfa8671bfcaab2 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Wed, 7 Nov 2018 13:36:39 +0900 Subject: server: fix isIBGPPeer() to handle local-as configuration Signed-off-by: FUJITA Tomonori --- pkg/server/peer.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg') 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 { -- cgit v1.2.3