summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/server.go33
1 files changed, 17 insertions, 16 deletions
diff --git a/server/server.go b/server/server.go
index a9c9c32f..52d917ac 100644
--- a/server/server.go
+++ b/server/server.go
@@ -783,22 +783,6 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg, incoming chan *
case *bgp.MessageError:
msgs = append(msgs, newSenderMsg(peer, []*bgp.BGPMessage{bgp.NewBGPNotificationMessage(m.TypeCode, m.SubTypeCode, m.Data)}))
case *bgp.BGPMessage:
- pathList, update, msgList := peer.handleBGPmessage(e)
- if len(msgList) > 0 {
- msgs = append(msgs, newSenderMsg(peer, msgList))
- break
- }
- if update == false {
- if len(pathList) > 0 {
- msgList := table.CreateUpdateMsgFromPaths(pathList)
- msgs = append(msgs, newSenderMsg(peer, msgList))
- }
- break
- } else {
- if len(pathList) > 0 {
- server.roaClient.validate(pathList)
- }
- }
if m.Header.Type == bgp.BGP_MSG_UPDATE {
listener := make(map[watcher]chan watcherEvent)
for _, watcher := range server.watchers {
@@ -835,6 +819,23 @@ func (server *BgpServer) handleFSMMessage(peer *Peer, e *FsmMsg, incoming chan *
server.broadcastMsgs = append(server.broadcastMsgs, bm)
}
}
+
+ pathList, update, msgList := peer.handleBGPmessage(e)
+ if len(msgList) > 0 {
+ msgs = append(msgs, newSenderMsg(peer, msgList))
+ break
+ }
+ if update == false {
+ if len(pathList) > 0 {
+ msgList := table.CreateUpdateMsgFromPaths(pathList)
+ msgs = append(msgs, newSenderMsg(peer, msgList))
+ }
+ break
+ } else {
+ if len(pathList) > 0 {
+ server.roaClient.validate(pathList)
+ }
+ }
// FIXME: refactor peer.handleBGPmessage and this func
if peer.isRouteServerClient() {
var accepted []*table.Path