From a7521827e1d8c964f1c9f342dc39d02f45660c49 Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Sat, 21 May 2016 15:00:41 +0000 Subject: server/table: fix intra-AS RTC route distribution Signed-off-by: ISHIDA Wataru --- table/adj.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'table/adj.go') 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 +} -- cgit v1.2.3