From d5201470f374cd5773f42c52c305bdf250453140 Mon Sep 17 00:00:00 2001 From: Abhijit Gadgil Date: Wed, 4 Apr 2018 19:45:24 +0530 Subject: [PATCH] server/rpki: fixed ROA sort The typo in function Less() was causing logical error during comparison and the comparison would always return whether AS number was less or not regardless of Maxlen. fixes #1633 --- server/rpki.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/rpki.go b/server/rpki.go index 75f25409..371fda4b 100644 --- a/server/rpki.go +++ b/server/rpki.go @@ -65,9 +65,9 @@ func (r roas) Less(i, j int) bool { r1 := r[i] r2 := r[j] - if r1.MaxLen < r1.MaxLen { + if r1.MaxLen < r2.MaxLen { return true - } else if r1.MaxLen > r1.MaxLen { + } else if r1.MaxLen > r2.MaxLen { return false }