From f2ceaa0cf95432c9854b3c7902fec55c73b6ae53 Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Sat, 23 Jan 2016 13:30:55 +0900 Subject: server: log received notification fsm doesn't pass notification messages to peer since 5c835fcc4fa03e74dd03bf7661b65771bf539adc log received notifications in fsmhandler. Signed-off-by: ISHIDA Wataru --- server/fsm.go | 8 ++++++++ server/peer.go | 9 --------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/server/fsm.go b/server/fsm.go index 89366d72..ad8be429 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -546,6 +546,14 @@ func (h *FSMHandler) recvMessageWithError() error { return nil } case bgp.BGP_MSG_NOTIFICATION: + body := m.Body.(*bgp.BGPNotification) + log.WithFields(log.Fields{ + "Topic": "Peer", + "Key": h.fsm.pConf.Config.NeighborAddress, + "Code": body.ErrorCode, + "Subcode": body.ErrorSubcode, + "Data": body.Data, + }).Warn("received notification") h.reason = "Notification received" return nil } diff --git a/server/peer.go b/server/peer.go index b8bc9bcb..77e07252 100644 --- a/server/peer.go +++ b/server/peer.go @@ -172,15 +172,6 @@ func (peer *Peer) handleBGPmessage(e *FsmMsg) ([]*table.Path, []*bgp.BGPMessage) } return paths, nil } - case bgp.BGP_MSG_NOTIFICATION: - body := m.Body.(*bgp.BGPNotification) - log.WithFields(log.Fields{ - "Topic": "Peer", - "Key": peer.conf.Config.NeighborAddress, - "Code": body.ErrorCode, - "Subcode": body.ErrorSubcode, - "Data": body.Data, - }).Warn("received notification") } return nil, nil } -- cgit v1.2.3