diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/fsm.go | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/server/fsm.go b/server/fsm.go index 34c8b187..f3d365f2 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -1049,7 +1049,8 @@ func (h *FSMHandler) sendMessageloop() error { } fsm.bgpMessageStateUpdate(m.Header.Type, false) - if m.Header.Type == bgp.BGP_MSG_NOTIFICATION { + switch m.Header.Type { + case bgp.BGP_MSG_NOTIFICATION: log.WithFields(log.Fields{ "Topic": "Peer", "Key": fsm.pConf.Config.NeighborAddress, @@ -1059,7 +1060,17 @@ func (h *FSMHandler) sendMessageloop() error { h.errorCh <- FSM_NOTIFICATION_SENT conn.Close() return fmt.Errorf("closed") - } else { + case bgp.BGP_MSG_UPDATE: + update := m.Body.(*bgp.BGPUpdate) + log.WithFields(log.Fields{ + "Topic": "Peer", + "Key": fsm.pConf.Config.NeighborAddress, + "State": fsm.state, + "nlri": update.NLRI, + "withdrawals": update.WithdrawnRoutes, + "attributes": update.PathAttributes, + }).Debug("sent update") + default: log.WithFields(log.Fields{ "Topic": "Peer", "Key": fsm.pConf.Config.NeighborAddress, |