From bf08b1d5bb566d37e23660d0603fd0dfd3d17999 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Fri, 27 Feb 2015 21:31:04 +0900 Subject: server: handle ROUTE_REFRESH only when the capability is advertized Signed-off-by: FUJITA Tomonori --- server/peer.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/peer.go') 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) -- cgit v1.2.3