summaryrefslogtreecommitdiffhomepage
path: root/server/peer.go
diff options
context:
space:
mode:
Diffstat (limited to 'server/peer.go')
-rw-r--r--server/peer.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/peer.go b/server/peer.go
index 3c274344..ba2d84c1 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -133,8 +133,10 @@ func (peer *Peer) handleBGPmessage(m *bgp.BGPMessage) {
}
case bgp.BGP_MSG_ROUTE_REFRESH:
- pathList := peer.adjRib.GetOutPathList(peer.rf)
- peer.sendMessages(table.CreateUpdateMsgFromPaths(pathList))
+ if _, ok := peer.capMap[bgp.BGP_CAP_ROUTE_REFRESH]; ok {
+ pathList := peer.adjRib.GetOutPathList(peer.rf)
+ peer.sendMessages(table.CreateUpdateMsgFromPaths(pathList))
+ }
case bgp.BGP_MSG_UPDATE:
peer.peerConfig.BgpNeighborCommonState.UpdateRecvTime = time.Now()
body := m.Body.(*bgp.BGPUpdate)