From: Ondřej Surý Date: Tue, 21 Aug 2018 10:54:15 +0000 (+0200) Subject: Remove support for legacy systems without in6addr_any X-Git-Tag: v9.13.3~30^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5083a42072c4afe5c12dd473782dbdbcd6860a16;p=thirdparty%2Fbind9.git Remove support for legacy systems without in6addr_any --- diff --git a/configure b/configure index d02ece934fd..494dfa4ab76 100755 --- 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 - #include - #include - $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 diff --git a/configure.in b/configure.in index 87cee59ba2b..696af203579 100644 --- a/configure.in +++ b/configure.in @@ -1943,28 +1943,14 @@ AC_COMPILE_IFELSE( #include ]], [[ - 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 - #include - #include - $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) diff --git a/lib/isc/include/isc/platform.h.in b/lib/isc/include/isc/platform.h.in index 8f5f029d106..47b1744df92 100644 --- a/lib/isc/include/isc/platform.h.in +++ b/lib/isc/include/isc/platform.h.in @@ -36,12 +36,6 @@ */ @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. diff --git a/lib/isc/unix/include/isc/net.h b/lib/isc/unix/include/isc/net.h index cffd310eac1..aeed627eeb2 100644 --- a/lib/isc/unix/include/isc/net.h +++ b/lib/isc/unix/include/isc/net.h @@ -80,21 +80,6 @@ #include #include -#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 diff --git a/lib/isc/unix/net.c b/lib/isc/unix/net.c index 5529fb6351b..baff6b49f77 100644 --- a/lib/isc/unix/net.c +++ b/lib/isc/unix/net.c @@ -93,10 +93,6 @@ #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 diff --git a/lib/isc/win32/ipv6.c b/lib/isc/win32/ipv6.c index 048315e7fa2..3e0eb37ed52 100644 --- a/lib/isc/win32/ipv6.c +++ b/lib/isc/win32/ipv6.c @@ -14,8 +14,5 @@ #include #include -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; diff --git a/lib/isc/win32/net.c b/lib/isc/win32/net.c index 173d7bb8712..3ea4de3e267 100644 --- a/lib/isc/win32/net.c +++ b/lib/isc/win32/net.c @@ -40,10 +40,6 @@ #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;