]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Change configure test for IFLA_AF_SPEC to IFLA_INET6_ADDR_GEN_MODE.
authorRoy Marples <roy@marples.name>
Wed, 14 Oct 2015 23:04:21 +0000 (23:04 +0000)
committerRoy Marples <roy@marples.name>
Wed, 14 Oct 2015 23:04:21 +0000 (23:04 +0000)
Fixes [1b15a20f7f].

configure
if-linux.c
ipv6.c

index a72db2aee8ce64b839df92bb5c06df0b72ebffb2..e3d038280123aef958c307f82ec15a89bf8ea48a 100755 (executable)
--- a/configure
+++ b/configure
@@ -458,21 +458,21 @@ EOF
        # but will be via WEXT.
        echo "DHCPCD_SRCS+=     if-linux-wext.c" >>$CONFIG_MK
 
-       printf "Testing for IFLA_AF_SPEC ... "
-       cat <<EOF >_IFLA_AF_SPEC.c
+       printf "Testing for IN6_ADDR_GEN_MODE_NONE ... "
+       cat <<EOF >_IN6_ADDR_GEN_MODE_NONE.c
 #include <linux/if_link.h>
 int main(void) {
-       int x = IFLA_AF_SPEC;
+       int x = IN6_ADDR_GEN_MODE_NONE;
        return x;
 }
 EOF
-       if $XCC _IFLA_AF_SPEC.c -o _IFLA_AF_SPEC 2>&3; then
+       if $XCC _IN6_ADDR_GEN_MODE_NONE.c -o _IN6_ADDR_GEN_MODE_NONE 2>&3; then
                echo "yes"
-               echo "#define HAVE_IFLA_AF_SPEC" >>$CONFIG_H
+               echo "#define HAVE_IN6_ADDR_GEN_MODE_NONE" >>$CONFIG_H
        else
                echo "no"
        fi
-       rm -f _IFLA_AF_SPEC.c _IFLA_AF_SPEC
+       rm -f _IN6_ADDR_GEN_MODE_NONE.c _IN6_ADDR_GEN_MODE_NONE
 
 fi
 
index 565bed8b0f8f3874167e1828659269ffc6a03905..34a021b30c8bcbd4bd76f51fb0849a92428b4880 100644 (file)
@@ -1697,7 +1697,7 @@ add_attr_nest_end(struct nlmsghdr *n, struct rtattr *nest)
 static int
 if_disable_autolinklocal(struct dhcpcd_ctx *ctx, unsigned int ifindex)
 {
-#ifdef HAVE_IFLA_AF_SPEC
+#ifdef HAVE_IN6_ADDR_GEN_MODE_NONE
        struct nlml nlm;
        struct rtattr *afs, *afs6;
 
@@ -1716,6 +1716,8 @@ if_disable_autolinklocal(struct dhcpcd_ctx *ctx, unsigned int ifindex)
 
        return send_netlink(ctx, NULL, NETLINK_ROUTE, &nlm.hdr, NULL);
 #else
+       UNUSED(ctx);
+       UNUSED(ifindex);
        errno = ENOTSUP;
        return -1;
 #endif
diff --git a/ipv6.c b/ipv6.c
index 0c0cd3c9555ad91d43cef2e8b997b60a6184f51d..22b80ddd8ab45eb204fbf1d61cf0d8ec3660143d 100644 (file)
--- a/ipv6.c
+++ b/ipv6.c
 #  endif
 #endif
 
-#if defined(HAVE_IFLA_AF_SPEC) || defined(ND6_IFF_AUTO_LINKLOCAL)
+#if defined(HAVE_IN6_ADDR_GEN_MODE_NONE) || defined(ND6_IFF_AUTO_LINKLOCAL)
 /* If we're using a private SLAAC address on wireless,
  * don't add it until we have associated as we randomise
  * it based on the SSID. */