diff options
author | Abhijit Gadgil <gabhijit@iitbombay.org> | 2018-04-04 19:45:24 +0530 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-04-05 11:00:50 +0900 |
commit | d5201470f374cd5773f42c52c305bdf250453140 (patch) | |
tree | a7073396bee444258fe39f46dd16f1e8277736a7 /server/rpki.go | |
parent | 264bd0ca126bf721687764332a01315d56e5b671 (diff) |
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
Diffstat (limited to 'server/rpki.go')
-rw-r--r-- | server/rpki.go | 4 |
1 files 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 } |