diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-13 21:46:12 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-13 22:19:02 +0900 |
commit | 96067b476fabc6271b939e5bc94034a233dea1c4 (patch) | |
tree | 946b61eeacc5b68fcde7d47c039afab6ad36685f | |
parent | c5fcffd18aad35399aeee8ff1f12233c6fa430c2 (diff) |
server: logging received notificaiton
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | server/peer.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/peer.go b/server/peer.go index e3a8c7ab..9bc79be8 100644 --- a/server/peer.go +++ b/server/peer.go @@ -215,6 +215,15 @@ func (peer *Peer) handleBGPmessage(m *bgp.BGPMessage) ([]*table.Path, bool, []*b table.UpdatePathAttrs4ByteAs(body) pathList = table.ProcessMessage(m, peer.peerInfo) peer.adjRib.UpdateIn(pathList) + case bgp.BGP_MSG_NOTIFICATION: + body := m.Body.(*bgp.BGPNotification) + log.WithFields(log.Fields{ + "Topic": "Peer", + "Key": peer.conf.NeighborConfig.NeighborAddress, + "Code": body.ErrorCode, + "Subcode": body.ErrorSubcode, + "Data": body.Data, + }).Warn("received notification") } return pathList, update, bgpMsgList } |