Pass right variable to IN6_IN_ADDR_* functions
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Jan 2019 16:10:04 +0000 (16:10 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Jan 2019 16:25:09 +0000 (16:25 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/network.c

index 0c2b260..24179f5 100644 (file)
@@ -94,25 +94,25 @@ static struct in6_addr make_last_address(const struct in6_addr* address, unsigne
 LOC_EXPORT int loc_network_new(struct loc_ctx* ctx, struct loc_network** network,
                struct in6_addr* address, unsigned int prefix) {
        // Address cannot be unspecified
-       if (IN6_IS_ADDR_UNSPECIFIED(&address)) {
+       if (IN6_IS_ADDR_UNSPECIFIED(address)) {
                DEBUG(ctx, "Start address is unspecified\n");
                return -EINVAL;
        }
 
        // Address cannot be loopback
-       if (IN6_IS_ADDR_LOOPBACK(&address)) {
+       if (IN6_IS_ADDR_LOOPBACK(address)) {
                DEBUG(ctx, "Start address is loopback address\n");
                return -EINVAL;
        }
 
        // Address cannot be link-local
-       if (IN6_IS_ADDR_LINKLOCAL(&address)) {
+       if (IN6_IS_ADDR_LINKLOCAL(address)) {
                DEBUG(ctx, "Start address cannot be link-local\n");
                return -EINVAL;
        }
 
        // Address cannot be site-local
-       if (IN6_IS_ADDR_SITELOCAL(&address)) {
+       if (IN6_IS_ADDR_SITELOCAL(address)) {
                DEBUG(ctx, "Start address cannot be site-local\n");
                return -EINVAL;
        }