summaryrefslogtreecommitdiffhomepage
path: root/table/table_manager.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-09 17:04:51 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-09 17:04:51 +0900
commit0298d02780d96903a1e350fb07a3dd2c751a1b4c (patch)
tree68b04612b2511ae611116ef385c58f038f4d2000 /table/table_manager.go
parent5b7e1e6846962a5a47e98c5b7b295d389e08d77d (diff)
table: fix path's getPrex()
must use Prefix (address + mask) as key. Same as commit 900cb321fb3dc353b102aa1970e652184abc24eb Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/table_manager.go')
-rw-r--r--table/table_manager.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/table/table_manager.go b/table/table_manager.go
index 1fb95f3f..6ee96518 100644
--- a/table/table_manager.go
+++ b/table/table_manager.go
@@ -172,8 +172,8 @@ func (manager *TableManager) calculate(destinationList []Destination) ([]Path, [
}
} else {
log.Debugf("new best path: NLRI: %v, next_hop=%v, reason=%v",
- newBestPath.getPrefix().String(),
- newBestPath.getNexthop().String(),
+ newBestPath.getPrefix(),
+ newBestPath.getNexthop(),
reason)
bestPaths = append(bestPaths, newBestPath)
@@ -244,7 +244,7 @@ func NewAdjRib() *AdjRib {
func (adj *AdjRib) update(rib map[bgp.RouteFamily]map[string]*ReceivedRoute, pathList []Path) {
for _, path := range pathList {
rf := path.GetRouteFamily()
- key := path.getPrefix().String()
+ key := path.getPrefix()
if path.IsWithdraw() {
_, found := rib[rf][key]
if found {
@@ -293,7 +293,7 @@ type ReceivedRoute struct {
}
func (rr *ReceivedRoute) String() string {
- return rr.path.(*PathDefault).getPrefix().String()
+ return rr.path.(*PathDefault).getPrefix()
}
func NewReceivedRoute(path Path, filtered bool) *ReceivedRoute {