diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-04-06 23:33:02 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-04-10 23:58:17 +0000 |
commit | 59420a4c4623492085348e07fb78eaae51182782 (patch) | |
tree | ea4ab75a0b39ca4ff049924edec59d7247ca0759 /server/server.go | |
parent | aa79a4de21772f556450cfe7e55e6f400c3f9dec (diff) |
server: support prefix-limit
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/server.go')
-rw-r--r-- | server/server.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/server.go b/server/server.go index af88f3ca..1b59402d 100644 --- a/server/server.go +++ b/server/server.go @@ -774,6 +774,7 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) []*SenderMsg { } else { drop = peer.configuredRFlist() } + peer.prefixLimitWarned = false peer.DropAll(drop) msgs = server.dropPeerAllRoutes(peer, drop) } else if peer.fsm.pConf.GracefulRestart.State.PeerRestarting && nextState == bgp.BGP_FSM_IDLE { @@ -847,8 +848,10 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg) []*SenderMsg { case *bgp.MessageError: return []*SenderMsg{newSenderMsg(peer, nil, bgp.NewBGPNotificationMessage(m.TypeCode, m.SubTypeCode, m.Data), false)} case *bgp.BGPMessage: - pathList, eor := peer.handleUpdate(e) - + pathList, eor, notification := peer.handleUpdate(e) + if notification != nil { + return []*SenderMsg{newSenderMsg(peer, nil, notification, true)} + } if m.Header.Type == bgp.BGP_MSG_UPDATE && server.watchers.watching(WATCHER_EVENT_UPDATE_MSG) { _, y := peer.fsm.capMap[bgp.BGP_CAP_FOUR_OCTET_AS_NUMBER] l, _ := peer.fsm.LocalHostPort() |