summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorwanghonghao <wanghonghao@bytedance.com>2018-07-16 12:10:56 +0800
committerwanghonghao <wanghonghao@bytedance.com>2018-07-16 12:10:56 +0800
commit695fb5298edf8f912a9d11922e96f23c6464ba58 (patch)
tree7171b7914009362c670814a63c42fcbc7de35b7b
parente64870d816ebf8cf556c06ab1f5e70f1ec74a232 (diff)
use function Equal() instead of build-in compare
-rw-r--r--internal/pkg/table/path.go2
-rw-r--r--pkg/server/server.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/pkg/table/path.go b/internal/pkg/table/path.go
index 14bbe6ae..d6407882 100644
--- a/internal/pkg/table/path.go
+++ b/internal/pkg/table/path.go
@@ -984,7 +984,7 @@ func (lhs *Path) Equal(rhs *Path) bool {
return false
}
- if lhs.GetSource() != rhs.GetSource() {
+ if !lhs.GetSource().Equal(rhs.GetSource()) {
return false
}
diff --git a/pkg/server/server.go b/pkg/server/server.go
index b00bb55d..b52ad284 100644
--- a/pkg/server/server.go
+++ b/pkg/server/server.go
@@ -471,7 +471,7 @@ func (s *BgpServer) filterpath(peer *Peer, path, old *table.Path) *table.Path {
// If the given "path" is locally generated and the same with "old", we
// assumes "path" was already sent before. This assumption avoids the
// infinite UPDATE loop between Route Reflector and its clients.
- if path.IsLocal() && path == old {
+ if path.IsLocal() && path.Equal(old) {
log.WithFields(log.Fields{
"Topic": "Peer",
"Key": peer.fsm.pConf.State.NeighborAddress,