diff --git a/route/path.go b/route/path.go index 6cfaf993303e727ddad5484c23683dc893f1d2ff..7c0edb7e11443fcad6f2bb0024794c32036fb629 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