]> git.ipfire.org Git - location/libloc.git/commitdiff
network: Add more excluded networks straight to the to_check list
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Nov 2020 15:14:31 +0000 (15:14 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Nov 2020 15:14:31 +0000 (15:14 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/network.c

index 9aa802f5108ba77919d2a2e7df0ba41dffff2a79..19c387d2998cdbeba3b7fa99d6c2d9ff1bdfc4a2 100644 (file)
@@ -705,11 +705,7 @@ LOC_EXPORT struct loc_network_list* loc_network_exclude_list(
                        if (loc_network_overlaps(subnet_to_check, subnet)) {
                                passed = 0;
 
-                               struct loc_network_list* excluded = loc_network_exclude(subnet_to_check, subnet);
-                               if (excluded) {
-                                       loc_network_list_merge(to_check, excluded);
-                                       loc_network_list_unref(excluded);
-                               }
+                               __loc_network_exclude_to_list(subnet_to_check, subnet, to_check);
 
                                loc_network_unref(subnet);
                                break;