From 695fb5298edf8f912a9d11922e96f23c6464ba58 Mon Sep 17 00:00:00 2001 From: wanghonghao Date: Mon, 16 Jul 2018 12:10:56 +0800 Subject: use function Equal() instead of build-in compare --- internal/pkg/table/path.go | 2 +- pkg/server/server.go | 2 +- 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, -- cgit v1.2.3