diff options
author | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-01-27 20:46:01 +0900 |
---|---|---|
committer | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2015-01-28 14:53:24 +0900 |
commit | 959994eb57ae2e9a2d852bc4b71ba35fda911680 (patch) | |
tree | e951870d8155265ee9d0fceacc84ce3b5f384831 /server | |
parent | 838cf25f000481f4adf9e508e1e533ec7e8977d4 (diff) |
table: add owner to NewTableManager's arguments
Diffstat (limited to 'server')
-rw-r--r-- | server/peer.go | 2 | ||||
-rw-r--r-- | server/peer_test.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/server/peer.go b/server/peer.go index ff75d354..28561619 100644 --- a/server/peer.go +++ b/server/peer.go @@ -93,7 +93,7 @@ func NewPeer(g config.GlobalType, peer config.NeighborType, serverMsgCh chan *se Address: peer.NeighborAddress, } p.adjRib = table.NewAdjRib() - p.rib = table.NewTableManager() + p.rib = table.NewTableManager(p.peerConfig.NeighborAddress.String()) p.t.Go(p.loop) return p } diff --git a/server/peer_test.go b/server/peer_test.go index eaea842a..4f310512 100644 --- a/server/peer_test.go +++ b/server/peer_test.go @@ -57,7 +57,7 @@ func update_fromRC3() *bgp.BGPMessage { } func TestProcessBGPUpdate_fourbyteAS(t *testing.T) { - rib1 := table.NewTableManager() + rib1 := table.NewTableManager("peer_test") m := update_fromRC3() peerInfo := peerRC3() @@ -81,7 +81,7 @@ func TestProcessBGPUpdate_fourbyteAS(t *testing.T) { assert.Equal(t, len(attrAS.Value), 1) assert.Equal(t, attrAS.Value[0].(*bgp.AsPathParam).AS, []uint16{bgp.AS_TRANS, 4000, bgp.AS_TRANS}) - rib2 := table.NewTableManager() + rib2 := table.NewTableManager("peer_test") pList2, wList2, _ := rib2.ProcessPaths(pathList) assert.Equal(t, len(pList2), 1) assert.Equal(t, len(wList2), 0) |