]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Only enable IPv4LL when INET is enabled.
authorRoy Marples <roy@marples.name>
Tue, 27 Sep 2016 10:21:31 +0000 (10:21 +0000)
committerRoy Marples <roy@marples.name>
Tue, 27 Sep 2016 10:21:31 +0000 (10:21 +0000)
Only enable DHCPv6 when INET6 is enabled.

configure
if-options.c

index 59cce5653cf9e6a692c59527066b2a6b623c2bed..8f4f23fc826a43c38fe1a333ac324d679dbe85d4 100755 (executable)
--- a/configure
+++ b/configure
@@ -44,12 +44,12 @@ for x do
        --enable-fork) FORK=yes;;
        --disable-static) STATIC=no;;
        --enable-static) STATIC=yes;;
-       --disable-ipv4) INET=no;;
-       --enable-ipv4) INET=yes;;
+       --disable-ipv4|--disable-inet) INET=no;;
+       --enable-ipv4|--enable-inet) INET=yes;;
        --disable-ipv4ll) IPV4LL=no;;
        --enable-ipv4ll) IPV4LL=yes; INET=yes;;
-       --disable-ipv6) INET6=no;;
-       --enable-ipv6) INET6=yes;;
+       --disable-ipv6|--disable-inet6) INET6=no;;
+       --enable-ipv6|--enable-inet6) INET6=yes;;
        --disable-dhcp6) DHCP6=no;;
        --enable-dhcp6) DHCP6=yes;;
        --disable-embedded) EMBEDDED=no;;
@@ -445,21 +445,21 @@ if [ -z "$INET" -o "$INET" = yes ]; then
        echo "Enabling INET support"
        echo "CPPFLAGS+=        -DINET" >>$CONFIG_MK
        echo "DHCPCD_SRCS+=     arp.c dhcp.c ipv4.c" >>$CONFIG_MK
-fi
-if [ -z "$IPV4LL" -o "$IPV4LL" = yes ]; then
-       echo "Enabling IPv4LL support"
-       echo "CPPFLAGS+=        -DIPV4LL" >>$CONFIG_MK
-       echo "DHCPCD_SRCS+=     ipv4ll.c" >>$CONFIG_MK
+       if [ -z "$IPV4LL" -o "$IPV4LL" = yes ]; then
+               echo "Enabling IPv4LL support"
+               echo "CPPFLAGS+=        -DIPV4LL" >>$CONFIG_MK
+               echo "DHCPCD_SRCS+=     ipv4ll.c" >>$CONFIG_MK
+       fi
 fi
 if [ -z "$INET6" -o "$INET6" = yes ]; then
        echo "Enabling INET6 support"
        echo "CPPFLAGS+=        -DINET6" >>$CONFIG_MK
        echo "DHCPCD_SRCS+=     ipv6.c ipv6nd.c" >>$CONFIG_MK
-fi
-if [ -z "$DHCP6" -o "$DHCP6" = yes ]; then
-       echo "Enabling DHCPv6 support"
-       echo "CPPFLAGS+=        -DDHCP6" >>$CONFIG_MK
-       echo "DHCPCD_SRCS+=     dhcp6.c" >>$CONFIG_MK
+       if [ -z "$DHCP6" -o "$DHCP6" = yes ]; then
+               echo "Enabling DHCPv6 support"
+               echo "CPPFLAGS+=        -DDHCP6" >>$CONFIG_MK
+               echo "DHCPCD_SRCS+=     dhcp6.c" >>$CONFIG_MK
+       fi
 fi
 if [ -z "$AUTH" -o "$AUTH" = yes ]; then
        echo "Enabling Authentiaction"
index 9028883ac496bd4db1a05c9ff15696c698feff22..f08a7a8749f6c32a953915f3098f795f726ec114 100644 (file)
@@ -672,7 +672,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
 #ifdef _REENTRANT
        struct group grpbuf;
 #endif
-#ifdef INET6
+#ifdef DHCP6
        size_t sl;
        struct if_ia *ia;
        uint8_t iaid[4];
@@ -1328,7 +1328,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
        case O_NOALIAS:
                ifo->options |= DHCPCD_NOALIAS;
                break;
-#ifdef INET6
+#ifdef DHCP6
        case O_IA_NA:
                i = D6_OPTION_IA_NA;
                /* FALLTHROUGH */