From 96067b476fabc6271b939e5bc94034a233dea1c4 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 13 Oct 2015 21:46:12 +0900 Subject: server: logging received notificaiton Signed-off-by: FUJITA Tomonori --- server/peer.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'server') 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 } -- cgit v1.2.3