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
This commit is contained in:
Abhijit Gadgil
2018-04-05 11:00:50 +09:00
committed by FUJITA Tomonori
parent 264bd0ca12
commit d5201470f3
+2 -2
View File
@@ -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
}