]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
network: Call subnet function with the correct order of arguments
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Nov 2020 15:15:33 +0000 (15:15 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 25 Nov 2020 15:15:33 +0000 (15:15 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/network.c

index 19c387d2998cdbeba3b7fa99d6c2d9ff1bdfc4a2..a96ce6d1dbe98c734514707f95853a9c74fc998b 100644 (file)
@@ -695,14 +695,14 @@ LOC_EXPORT struct loc_network_list* loc_network_exclude_list(
                        subnet = loc_network_list_get(list, i);
 
                        // Drop this subnet if is a subnet of another subnet
-                       if (loc_network_is_subnet(subnet_to_check, subnet)) {
+                       if (loc_network_is_subnet(subnet, subnet_to_check)) {
                                passed = 0;
                                loc_network_unref(subnet);
                                break;
                        }
 
                        // Break it down if it overlaps
-                       if (loc_network_overlaps(subnet_to_check, subnet)) {
+                       if (loc_network_overlaps(subnet, subnet_to_check)) {
                                passed = 0;
 
                                __loc_network_exclude_to_list(subnet_to_check, subnet, to_check);