Remove ability to compile without IPv6 support.
This was the source of a large number of #ifdefs, originally
included for use with old embedded libc versions. I'm
sure no-one wants or needs IPv6-free code these days, so this
is a move towards more maintainable code.
diff --git a/src/config.h b/src/config.h
index 762c49b..0712d3d 100644
--- a/src/config.h
+++ b/src/config.h
@@ -131,7 +131,6 @@
NO_ID
Don't report *.bind CHAOS info to clients, forward such requests upstream instead.
-NO_IPV6
NO_TFTP
NO_DHCP
NO_DHCP6
@@ -141,8 +140,8 @@
NO_DUMPFILE
NO_INOTIFY
these are available to explicitly disable compile time options which would
- otherwise be enabled automatically (HAVE_IPV6, >2Gb file sizes) or
- which are enabled by default in the distributed source tree. Building dnsmasq
+ otherwise be enabled automatically or which are enabled by default
+ in the distributed source tree. Building dnsmasq
with something like "make COPTS=-DNO_SCRIPT" will do the trick.
NO_GMP
Don't use and link against libgmp, Useful if nettle is built with --enable-mini-gmp.
@@ -308,29 +307,9 @@
#endif
-/* Decide if we're going to support IPv6 */
-/* We assume that systems which don't have IPv6
- headers don't have ntop and pton either */
-
-#if defined(INET6_ADDRSTRLEN) && defined(IPV6_V6ONLY)
-# define HAVE_IPV6
-# define ADDRSTRLEN INET6_ADDRSTRLEN
-#else
-# if !defined(INET_ADDRSTRLEN)
-# define INET_ADDRSTRLEN 16 /* 4*3 + 3 dots + NULL */
-# endif
-# undef HAVE_IPV6
-# define ADDRSTRLEN INET_ADDRSTRLEN
-#endif
-
-
/* rules to implement compile-time option dependencies and
the NO_XXX flags */
-#ifdef NO_IPV6
-#undef HAVE_IPV6
-#endif
-
#ifdef NO_TFTP
#undef HAVE_TFTP
#endif
@@ -340,7 +319,7 @@
#undef HAVE_DHCP6
#endif
-#if defined(NO_DHCP6) || !defined(HAVE_IPV6)
+#if defined(NO_DHCP6)
#undef HAVE_DHCP6
#endif
@@ -385,9 +364,6 @@
#ifdef DNSMASQ_COMPILE_OPTS
static char *compile_opts =
-#ifndef HAVE_IPV6
-"no-"
-#endif
"IPv6 "
#ifndef HAVE_GETOPT_LONG
"no-"