summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-04-27 11:02:42 +0000
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-04-27 15:20:51 +0000
commit87a951546c43cb70ad3a03ec42de7cead8d25d72 (patch)
tree62e79e2dea8ae5a6a8f13c7f88f9cd3d0eaf3a29 /server
parent91cb8ea23f454592be9fb4565f0f477afdbcb0ec (diff)
table: make table.ProcessMessage a function
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/peer.go3
-rw-r--r--server/peer_test.go3
2 files changed, 2 insertions, 4 deletions
diff --git a/server/peer.go b/server/peer.go
index c99f5fd2..d56e3e34 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -257,8 +257,7 @@ func (peer *Peer) handleBGPmessage(m *bgp.BGPMessage) {
return
}
table.UpdatePathAttrs4ByteAs(body)
- msg := table.NewProcessMessage(m, peer.peerInfo)
- pathList := msg.ToPathList()
+ pathList := table.ProcessMessage(m, peer.peerInfo)
peer.adjRib.UpdateIn(pathList)
peer.sendPathsToSiblings(pathList)
}
diff --git a/server/peer_test.go b/server/peer_test.go
index ab3bfa54..756607e2 100644
--- a/server/peer_test.go
+++ b/server/peer_test.go
@@ -64,8 +64,7 @@ func TestProcessBGPUpdate_fourbyteAS(t *testing.T) {
m := update_fromRC3()
peerInfo := peerRC3()
- msg := table.NewProcessMessage(m, peerInfo)
- pathList := msg.ToPathList()
+ pathList := table.ProcessMessage(m, peerInfo)
pList, _ := rib1.ProcessPaths(pathList)
assert.Equal(t, len(pList), 1)