From: Roy Marples Date: Tue, 27 Sep 2016 10:21:31 +0000 (+0000) Subject: Only enable IPv4LL when INET is enabled. X-Git-Tag: v6.11.4~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd76235377543cde7eb4bb1cc5b4b38afbaffed4;p=thirdparty%2Fdhcpcd.git Only enable IPv4LL when INET is enabled. Only enable DHCPv6 when INET6 is enabled. --- diff --git a/configure b/configure index 59cce565..8f4f23fc 100755 --- 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" diff --git a/if-options.c b/if-options.c index 9028883a..f08a7a87 100644 --- a/if-options.c +++ b/if-options.c @@ -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 */