summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-11-09 05:46:36 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-11-09 05:46:36 -0800
commit431ce6b171a05cd17784a86ea2da1dfbf2f37ea0 (patch)
treed7b7a2adadf0c8ce248a371a8ae27b38beae97db /server/fsm.go
parentefcbc131df3aaee82eecc659cdf3428b9f5fe81b (diff)
server: move ProcessMessage to fsm from peer
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/fsm.go')
-rw-r--r--server/fsm.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/fsm.go b/server/fsm.go
index 2de4787e..66762ca3 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -40,6 +40,7 @@ type fsmMsg struct {
MsgType fsmMsgType
MsgSrc string
MsgData interface{}
+ PathList []*table.Path
}
const (
@@ -503,6 +504,10 @@ func (h *FSMHandler) recvMessageWithError() error {
"error": err,
}).Warn("malformed BGP update message")
fmsg.MsgData = err
+ } else {
+ // FIXME: we should use the original message for bmp/mrt
+ table.UpdatePathAttrs4ByteAs(body)
+ fmsg.PathList = table.ProcessMessage(m, h.fsm.peerInfo)
}
fallthrough
case bgp.BGP_MSG_KEEPALIVE: