summaryrefslogtreecommitdiffhomepage
path: root/table/table_manager.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-06-30 17:32:38 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-07-01 11:56:31 +0900
commit834df87c82f75b787c432d9194b4c82bff78e9d6 (patch)
treeac838ec242048aa2162311b5b5602a681bdc1f28 /table/table_manager.go
parente7cefb51f9cfd0012384239ee736375841af7a76 (diff)
table: check paths' equivalence deeper
if we add same path multiple times by the following gobgp cli commands, $ gobgp global rib add 10.0.0.0/24 $ gobgp global rib add 10.0.0.0/24 $ gobgp global rib add 10.0.0.0/24 current implementation sends multiple update messages to peers even through the content of the path is same. This is due to the shallow equivalence checking. This patch checks paths' equivalence deeper by adding Equal() method to Path. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/table_manager.go')
-rw-r--r--table/table_manager.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/table/table_manager.go b/table/table_manager.go
index f94eab9e..4a692d23 100644
--- a/table/table_manager.go
+++ b/table/table_manager.go
@@ -151,7 +151,7 @@ func (manager *TableManager) calculate(destinationList []*Destination) ([]*Path,
destination.setBestPathReason(reason)
currentBestPath := destination.GetBestPath()
- if newBestPath != nil && currentBestPath == newBestPath {
+ if newBestPath != nil && newBestPath.Equal(currentBestPath) {
// best path is not changed
log.WithFields(log.Fields{
"Topic": "table",