summaryrefslogtreecommitdiffhomepage
path: root/table/adj.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-05-29 20:27:25 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-05-29 20:27:25 +0900
commit25e14f8598c28111dbf001f69898ff32bdccde7a (patch)
treec6fc71bad89092abb620fdaccb0ea97f5d36c5b9 /table/adj.go
parentebb2c9727a4002ab1b90d43485caf9b30937f372 (diff)
table: use path Equal method in adj rather than homegrown funciton
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/adj.go')
-rw-r--r--table/adj.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/table/adj.go b/table/adj.go
index 8aa40370..2fb46b4a 100644
--- a/table/adj.go
+++ b/table/adj.go
@@ -17,7 +17,6 @@ package table
import (
"github.com/osrg/gobgp/packet/bgp"
- "reflect"
)
type AdjRib struct {
@@ -68,7 +67,7 @@ func (adj *AdjRib) Update(pathList []*Path) {
adj.accepted[rf]++
}
}
- if found && reflect.DeepEqual(old.GetPathAttrs(), path.GetPathAttrs()) {
+ if found && old.Equal(path) {
path.setTimestamp(old.GetTimestamp())
}
adj.table[rf][key] = path