From 27213986534d2c20bcdf2112dca3441ec748588c Mon Sep 17 00:00:00 2001
From: Christoph Petrausch <christoph.petrausch@inovex.de>
Date: Thu, 24 May 2018 11:36:30 +0200
Subject: [PATCH] Fix bug in path.Equal. Use Compare()==0 instead of own
 implementation

---
 route/path.go | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/route/path.go b/route/path.go
index 6cfaf993..7c0edb7e 100644
--- a/route/path.go
+++ b/route/path.go
@@ -53,19 +53,7 @@ func (p *Path) Equal(q *Path) bool {
 	if p == nil || q == nil {
 		return false
 	}
-
-	if p.Type != q.Type {
-		return false
-	}
-
-	switch p.Type {
-	case BGPPathType:
-		if *p.BGPPath != *q.BGPPath {
-			return false
-		}
-	}
-
-	return true
+	return p.Compare(q) == 0
 }
 
 // PathsDiff gets the list of elements contained by a but not b
-- 
GitLab