summaryrefslogtreecommitdiffhomepage
path: root/table
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-06 10:09:14 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-03-06 10:09:14 +0900
commitea6446b4ef6e461837ed4f94216fe4fadf2964fa (patch)
tree911c211c1de793b2ee7d489c254db2f5d07ec20f /table
parentaf7f4d5531f2116e01f36b99611ffdbcc19a8cdd (diff)
table: remove RF from PeerInfo
Cleanup for supporting multiple route families. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table')
-rw-r--r--table/destination.go1
-rw-r--r--table/table_manager.go5
2 files changed, 2 insertions, 4 deletions
diff --git a/table/destination.go b/table/destination.go
index 769e6545..6734229a 100644
--- a/table/destination.go
+++ b/table/destination.go
@@ -44,7 +44,6 @@ type PeerInfo struct {
AS uint32
ID net.IP
LocalID net.IP
- RF bgp.RouteFamily
Address net.IP
}
diff --git a/table/table_manager.go b/table/table_manager.go
index 876ea331..be068e40 100644
--- a/table/table_manager.go
+++ b/table/table_manager.go
@@ -233,10 +233,9 @@ func (manager *TableManager) calculate(destinationList []Destination) ([]Path, [
return bestPaths, lostPaths, nil
}
-func (manager *TableManager) DeletePathsforPeer(peerInfo *PeerInfo) ([]Path, []Path, error) {
- destinationList := manager.Tables[peerInfo.RF].DeleteDestByPeer(peerInfo)
+func (manager *TableManager) DeletePathsforPeer(peerInfo *PeerInfo, rf bgp.RouteFamily) ([]Path, []Path, error) {
+ destinationList := manager.Tables[rf].DeleteDestByPeer(peerInfo)
return manager.calculate(destinationList)
-
}
func (manager *TableManager) ProcessPaths(pathList []Path) ([]Path, []Path, error) {