lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit 17d49c4f authored by Michael Tremer's avatar Michael Tremer

importer: Correctly sort the results

The results where incorrectly ordered so that the DISTINCT clause
removed the wrong rows matching an incorrect parent subnet.
Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 5372d9c7
......@@ -305,11 +305,12 @@ class CLI(object):
) AS is_anycast,
-- Must be part of returned values for ORDER BY clause
masklen(known_networks.network) AS sort
masklen(announcements.network) AS sort_a,
masklen(networks.network) AS sort_b
FROM known_networks
LEFT JOIN announcements ON known_networks.network <<= announcements.network
LEFT JOIN networks ON known_networks.network <<= networks.network
ORDER BY known_networks.network, sort DESC
ORDER BY known_networks.network, sort_a DESC, sort_b DESC
""")
for row in rows:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment