diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-05-21 15:00:41 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-05-23 09:46:53 +0900 |
commit | a7521827e1d8c964f1c9f342dc39d02f45660c49 (patch) | |
tree | ce40585522e52bc881c7640f95c25961948342f1 /table/adj.go | |
parent | 31342564c9e7a78a183f11dd637e36c08e0f274b (diff) |
server/table: fix intra-AS RTC route distribution
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/adj.go')
-rw-r--r-- | table/adj.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/table/adj.go b/table/adj.go index 5e685f2e..8aa40370 100644 --- a/table/adj.go +++ b/table/adj.go @@ -156,3 +156,16 @@ func (adj *AdjRib) StaleAll(rfList []bgp.RouteFamily) { } } } + +func (adj *AdjRib) Exists(path *Path) bool { + if path == nil { + return false + } + family := path.GetRouteFamily() + table, ok := adj.table[family] + if !ok { + return false + } + _, ok = table[path.getPrefix()] + return ok +} |