]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove support for legacy platforms without in6addr_loopback
authorOndřej Surý <ondrej@sury.org>
Tue, 21 Aug 2018 11:07:05 +0000 (13:07 +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

index 494dfa4ab76803b6c25836d415ed787c685960b8..ea8ebb72469ed92c367a7c9076c4d2dbde86495b 100755 (executable)
--- a/configure
+++ b/configure
@@ -750,7 +750,6 @@ ISC_PLATFORM_HAVEIF_LADDRREQ
 ISC_PLATFORM_HAVESCOPEID
 ISC_PLATFORM_HAVESOCKADDRSTORAGE
 ISC_PLATFORM_HAVEIN6PKTINFO
-ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
 BIND9_CO_RULE
 LIBTOOL_ALLOW_UNDEFINED
 LIBTOOL_MODE_UNINSTALL
@@ -17847,6 +17846,7 @@ main ()
        struct sockaddr_in6 sin6;
        struct in6_addr in6;
        in6 = in6addr_any;
+       in6 = in6addr_loopback;
        return (0);
 
   ;
@@ -17864,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_loopback" >&5
-$as_echo_n "checking for in6addr_loopback... " >&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_loopback; 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_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-   ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin6_scope_id in struct sockaddr_in6" >&5
 $as_echo_n "checking for sin6_scope_id in struct sockaddr_in6... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17987,7 +17956,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 696af20357982647eeb94718700769c7791c7ccb..52f761bd380035f6b3f79fd6e775c468466d15d2 100644 (file)
@@ -1946,28 +1946,12 @@ AC_COMPILE_IFELSE(
        struct sockaddr_in6 sin6;
        struct in6_addr in6;
        in6 = in6addr_any;
+       in6 = in6addr_loopback;
        return (0);
      ]])],
   [AC_MSG_RESULT([yes])],
   [AC_MSG_FAILURE([IPv6 support is mandatory])])
 
-AC_MSG_CHECKING([for in6addr_loopback])
-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_loopback; return (in6.s6_addr[0]);
-     ]])],
-  [AC_MSG_RESULT(yes)
-   ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"],
-  [AC_MSG_RESULT(no)
-   ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"])
-
 AC_MSG_CHECKING([for sin6_scope_id in struct sockaddr_in6])
 AC_COMPILE_IFELSE(
   [AC_LANG_PROGRAM(
@@ -2011,7 +1995,6 @@ ISC_PLATFORM_HAVESOCKADDRSTORAGE="#define ISC_PLATFORM_HAVESOCKADDRSTORAGE 1"],
 [AC_MSG_RESULT(no)
 ISC_PLATFORM_HAVESOCKADDRSTORAGE="#undef ISC_PLATFORM_HAVESOCKADDRSTORAGE"])
 
-AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
 AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
 AC_SUBST(ISC_PLATFORM_HAVESOCKADDRSTORAGE)
 AC_SUBST(ISC_PLATFORM_HAVESCOPEID)
index 47b1744df92c107ae2584c6ee0703ee13faa2003..d8f783b623aece8e6c0be9fb14aad071bc61380d 100644 (file)
  */
 @ISC_PLATFORM_HAVESALEN@
 
-/*! \brief
- * If this system is missing in6addr_loopback, ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
- * will be defined.
- */
-@ISC_PLATFORM_NEEDIN6ADDRLOOPBACK@
-
 /*! \brief
  * If this system has in6_pktinfo, ISC_PLATFORM_HAVEIN6PKTINFO will be
  * defined.
index aeed627eeb2ff9c420cc3b94a5ddfb7e200e4e44..744c9d6fadb7dc4406a6dbe09f541eeb3c4c6fb9 100644 (file)
@@ -193,11 +193,6 @@ struct sockaddr_storage {
 };
 #endif
 
-#if defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
-extern const struct in6_addr isc_net_in6addrloop;
-#define in6addr_loopback isc_net_in6addrloop
-#endif
-
 #ifdef ISC_PLATFORM_NEEDPORTT
 /*%
  * Ensure type in_port_t is defined.
index baff6b49f77629b222962005feec4f8d8bb5f57c..f46d9b0c860284dab1ab1ec95fe4ff78a088aba9 100644 (file)
 
 #endif /* HAVE_SYSCTLBYNAME */
 
-#if defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
-const struct in6_addr isc_net_in6addrloop = IN6ADDR_LOOPBACK_INIT;
-#endif
-
 static isc_once_t      once_ipv6only = ISC_ONCE_INIT;
 
 #if defined(ISC_PLATFORM_HAVEIN6PKTINFO)