server: fix isIBGPPeer() to handle local-as configuration

Signed-off-by: FUJITA Tomonori <[email protected]>
This commit is contained in:
FUJITA Tomonori
2018-11-07 17:29:07 +09:00
parent 5ab45752ce
commit 433440067d
+3 -1
View File
@@ -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 {