mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
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:
committed by
FUJITA Tomonori
parent
264bd0ca12
commit
d5201470f3
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user