Commit 5083a420 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

Remove support for legacy systems without in6addr_any

parent b962f47d
......@@ -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
......
......@@ -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)
......
......@@ -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.
......
......@@ -80,21 +80,6 @@
#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
......
......@@ -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
......
......@@ -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;
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment