From: Roy Marples Date: Wed, 14 Oct 2015 23:04:21 +0000 (+0000) Subject: Change configure test for IFLA_AF_SPEC to IFLA_INET6_ADDR_GEN_MODE. X-Git-Tag: v6.9.4~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccb6ccbe6dab4cd62a82394bc917118912e2af4b;p=thirdparty%2Fdhcpcd.git Change configure test for IFLA_AF_SPEC to IFLA_INET6_ADDR_GEN_MODE. Fixes [1b15a20f7f]. --- diff --git a/configure b/configure index a72db2ae..e3d03828 100755 --- 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 <_IFLA_AF_SPEC.c + printf "Testing for IN6_ADDR_GEN_MODE_NONE ... " + cat <_IN6_ADDR_GEN_MODE_NONE.c #include 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 diff --git a/if-linux.c b/if-linux.c index 565bed8b..34a021b3 100644 --- a/if-linux.c +++ b/if-linux.c @@ -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 0c0cd3c9..22b80ddd 100644 --- a/ipv6.c +++ b/ipv6.c @@ -112,7 +112,7 @@ # 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. */