diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-04-10 22:39:08 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-05-07 21:18:04 +0900 |
commit | ee91af5b638755a19c6954579b77a28916fb9bff (patch) | |
tree | 478e31d4ba6a8b5563e4e631d81c4f8ef36bd659 /table/table.go | |
parent | 34382909f09cb9758132a3653306a917ef4a61c3 (diff) |
preparation for shrinking Destination structure
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/table.go')
-rw-r--r-- | table/table.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/table/table.go b/table/table.go index 6662376e..6bc88149 100644 --- a/table/table.go +++ b/table/table.go @@ -69,37 +69,6 @@ func (t *Table) GetRoutefamily() bgp.RouteFamily { return t.routeFamily } -func (t *Table) insert(path *Path) *Destination { - t.validatePath(path) - dest := t.getOrCreateDest(path.GetNlri()) - - if path.IsWithdraw { - // withdraw insert - dest.AddWithdraw(path) - } else { - // path insert - dest.AddNewPath(path) - } - return dest -} - -func (t *Table) DeleteDestByPeer(peerInfo *PeerInfo) []*Destination { - dsts := []*Destination{} - for _, dst := range t.destinations { - match := false - for _, p := range dst.knownPathList { - if p.GetSource().Equal(peerInfo) { - dst.AddWithdraw(p) - match = true - } - } - if match { - dsts = append(dsts, dst) - } - } - return dsts -} - func (t *Table) deletePathsByVrf(vrf *Vrf) []*Path { pathList := make([]*Path, 0) for _, dest := range t.destinations { |