summaryrefslogtreecommitdiffhomepage
path: root/table/table_manager.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-05-21 15:00:41 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-05-23 09:46:53 +0900
commita7521827e1d8c964f1c9f342dc39d02f45660c49 (patch)
treece40585522e52bc881c7640f95c25961948342f1 /table/table_manager.go
parent31342564c9e7a78a183f11dd637e36c08e0f274b (diff)
server/table: fix intra-AS RTC route distribution
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/table_manager.go')
-rw-r--r--table/table_manager.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/table/table_manager.go b/table/table_manager.go
index a041c5b9..cc9784b9 100644
--- a/table/table_manager.go
+++ b/table/table_manager.go
@@ -358,3 +358,15 @@ func (manager *TableManager) GetPathList(id string, rfList []bgp.RouteFamily) []
}
return paths
}
+
+func (manager *TableManager) GetDestination(path *Path) *Destination {
+ if path == nil {
+ return nil
+ }
+ family := path.GetRouteFamily()
+ t, ok := manager.Tables[family]
+ if !ok {
+ return nil
+ }
+ return t.GetDestination(path.getPrefix())
+}