diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-02-27 21:31:04 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-02-27 21:31:04 +0900 |
commit | bf08b1d5bb566d37e23660d0603fd0dfd3d17999 (patch) | |
tree | f4af5a04c23b9d508da8cb675e20fc678e28d7d8 /server/peer.go | |
parent | 3dd63d4afbfd19c67b0746e223de1657040e0da8 (diff) |
server: handle ROUTE_REFRESH only when the capability is advertized
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/peer.go')
-rw-r--r-- | server/peer.go | 6 |
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) |