]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
network: Sort result of excluded lists
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 13 Nov 2020 11:29:15 +0000 (11:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 13 Nov 2020 11:29:15 +0000 (11:29 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/database.c
src/network.c

index 0f3cdc2c0fe98ade6bba79d45d9e30af7341eace..6849d97abb9dadb02eaea94a9e8cc45e76993fb7 100644 (file)
@@ -1315,9 +1315,6 @@ static int __loc_database_enumerator_next_network_flattened(
                goto END;
        }
 
-       // Sort the result
-       loc_network_list_sort(excluded);
-
        // Reverse the list
        loc_network_list_reverse(excluded);
 
index d67f1162e5398a6ee2560f5f2ed0227e7498aa4e..9d02bf82cc012e85e5f026010cf631d5d2b6cd33 100644 (file)
@@ -773,6 +773,9 @@ LOC_EXPORT struct loc_network_list* loc_network_exclude_list(
 
        loc_network_list_unref(to_check);
 
+       // Sort the result
+       loc_network_list_sort(subnets);
+
        return subnets;
 }