]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove support for legacy systems without in6addr_any
authorOndřej Surý <ondrej@sury.org>
Tue, 21 Aug 2018 10:54:15 +0000 (12:54 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 28 Aug 2018 08:31:48 +0000 (10:31 +0200)
configure
configure.in
lib/isc/include/isc/platform.h.in
lib/isc/unix/include/isc/net.h
lib/isc/unix/net.c
lib/isc/win32/ipv6.c
lib/isc/win32/net.c

index d02ece934fd8198d2ff76c20e2d7f6a6bb79f4a4..494dfa4ab76803b6c25836d415ed787c685960b8 100755 (executable)
--- a/configure
+++ b/configure
@@ -751,7 +751,6 @@ ISC_PLATFORM_HAVESCOPEID
 ISC_PLATFORM_HAVESOCKADDRSTORAGE
 ISC_PLATFORM_HAVEIN6PKTINFO
 ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
-ISC_PLATFORM_NEEDIN6ADDRANY
 BIND9_CO_RULE
 LIBTOOL_ALLOW_UNDEFINED
 LIBTOOL_MODE_UNINSTALL
@@ -17845,7 +17844,10 @@ int
 main ()
 {
 
-       struct sockaddr_in6 sin6; return (0);
+       struct sockaddr_in6 sin6;
+       struct in6_addr in6;
+       in6 = in6addr_any;
+       return (0);
 
   ;
   return 0;
@@ -17862,37 +17864,6 @@ See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
-$as_echo_n "checking for in6addr_any... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-       #include <sys/types.h>
-       #include <sys/socket.h>
-       #include <netinet/in.h>
-       $isc_in_addr6_hack
-
-int
-main ()
-{
-
-       struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-   ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-   ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_loopback" >&5
 $as_echo_n "checking for in6addr_loopback... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18017,7 +17988,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
 
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
 $as_echo_n "checking for struct if_laddrreq... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
index 87cee59ba2bd51a06b0127e178f4418786c1646a..696af20357982647eeb94718700769c7791c7ccb 100644 (file)
@@ -1943,28 +1943,14 @@ AC_COMPILE_IFELSE(
        #include <netinet/in.h>
      ]],
      [[
-       struct sockaddr_in6 sin6; return (0);
+       struct sockaddr_in6 sin6;
+       struct in6_addr in6;
+       in6 = in6addr_any;
+       return (0);
      ]])],
   [AC_MSG_RESULT([yes])],
   [AC_MSG_FAILURE([IPv6 support is mandatory])])
 
-AC_MSG_CHECKING([for in6addr_any])
-AC_COMPILE_IFELSE(
-  [AC_LANG_PROGRAM(
-     [[
-       #include <sys/types.h>
-       #include <sys/socket.h>
-       #include <netinet/in.h>
-       $isc_in_addr6_hack
-     ]],
-     [[
-       struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);
-     ]])],
-  [AC_MSG_RESULT([yes])
-   ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"],
-  [AC_MSG_RESULT([no])
-   ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"])
-
 AC_MSG_CHECKING([for in6addr_loopback])
 AC_COMPILE_IFELSE(
   [AC_LANG_PROGRAM(
@@ -2025,7 +2011,6 @@ ISC_PLATFORM_HAVESOCKADDRSTORAGE="#define ISC_PLATFORM_HAVESOCKADDRSTORAGE 1"],
 [AC_MSG_RESULT(no)
 ISC_PLATFORM_HAVESOCKADDRSTORAGE="#undef ISC_PLATFORM_HAVESOCKADDRSTORAGE"])
 
-AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
 AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
 AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
 AC_SUBST(ISC_PLATFORM_HAVESOCKADDRSTORAGE)
index 8f5f029d106f7bba946a17749d899fb058c28b7c..47b1744df92c107ae2584c6ee0703ee13faa2003 100644 (file)
  */
 @ISC_PLATFORM_HAVESALEN@
 
-/*! \brief
- * If this system is missing in6addr_any, ISC_PLATFORM_NEEDIN6ADDRANY will
- * be defined.
- */
-@ISC_PLATFORM_NEEDIN6ADDRANY@
-
 /*! \brief
  * If this system is missing in6addr_loopback, ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
  * will be defined.
index cffd310eac192a2cbfa205b3e60efac1b6b8695e..aeed627eeb2ff9c420cc3b94a5ddfb7e200e4e44 100644 (file)
 #include <isc/lang.h>
 #include <isc/types.h>
 
-#ifndef IN6ADDR_ANY_INIT
-#ifdef s6_addr
-/*%
- * Required for some pre RFC2133 implementations.
- * IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT were added in
- * draft-ietf-ipngwg-bsd-api-04.txt or draft-ietf-ipngwg-bsd-api-05.txt.
- * If 's6_addr' is defined then assume that there is a union and three
- * levels otherwise assume two levels required.
- */
-#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
-#else
-#define IN6ADDR_ANY_INIT { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } }
-#endif
-#endif
-
 #ifndef IN6ADDR_LOOPBACK_INIT
 #ifdef s6_addr
 /*% IPv6 address loopback init */
@@ -208,14 +193,6 @@ struct sockaddr_storage {
 };
 #endif
 
-#if defined(ISC_PLATFORM_NEEDIN6ADDRANY)
-extern const struct in6_addr isc_net_in6addrany;
-/*%
- * Cope with a missing in6addr_any and in6addr_loopback.
- */
-#define in6addr_any isc_net_in6addrany
-#endif
-
 #if defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
 extern const struct in6_addr isc_net_in6addrloop;
 #define in6addr_loopback isc_net_in6addrloop
index 5529fb6351bbbc5cfd861df583a0903d5d1e1833..baff6b49f77629b222962005feec4f8d8bb5f57c 100644 (file)
 
 #endif /* HAVE_SYSCTLBYNAME */
 
-#if defined(ISC_PLATFORM_NEEDIN6ADDRANY)
-const struct in6_addr isc_net_in6addrany = IN6ADDR_ANY_INIT;
-#endif
-
 #if defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
 const struct in6_addr isc_net_in6addrloop = IN6ADDR_LOOPBACK_INIT;
 #endif
index 048315e7fa20500d4087711bb8ed6523c9d1a3b0..3e0eb37ed525c2fb36b85894672adb1dd1115185 100644 (file)
@@ -14,8 +14,5 @@
 #include <isc/net.h>
 #include <isc/platform.h>
 
-LIBISC_EXTERNAL_DATA const struct in6_addr isc_in6addr_any =
-       IN6ADDR_ANY_INIT;
-
 LIBISC_EXTERNAL_DATA const struct in6_addr isc_in6addr_loopback =
        IN6ADDR_LOOPBACK_INIT;
index 173d7bb87128b3bd7e2768d4633b0c0d16d980ba..3ea4de3e2678026b0052409662f1db5ce71158d1 100644 (file)
 #define ISC_NET_PORTRANGEHIGH 65535
 #endif /* ISC_NET_PORTRANGEHIGH */
 
-#if defined(ISC_PLATFORM_NEEDIN6ADDRANY)
-const struct in6_addr isc_net_in6addrany = IN6ADDR_ANY_INIT;
-#endif
-
 static isc_once_t      once = ISC_ONCE_INIT;
 static isc_once_t      once_ipv6only = ISC_ONCE_INIT;
 static isc_once_t      once_ipv6pktinfo = ISC_ONCE_INIT;