diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-01-23 13:30:55 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-01-25 04:57:11 -0800 |
commit | f2ceaa0cf95432c9854b3c7902fec55c73b6ae53 (patch) | |
tree | 81b0a873503a32561a31124a1d8c38ad22968c1b | |
parent | cca91da0dfe70c2c32d5152b3a2cf76bfdb0f048 (diff) |
server: log received notification
fsm doesn't pass notification messages to peer since
5c835fcc4fa03e74dd03bf7661b65771bf539adc
log received notifications in fsmhandler.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
-rw-r--r-- | server/fsm.go | 8 | ||||
-rw-r--r-- | 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 } |