mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
Require IPv6 support from the OS
This commit is contained in:
132
configure
vendored
132
configure
vendored
@@ -748,16 +748,11 @@ ISC_PLATFORM_NEEDNTOP
|
||||
ISC_PLATFORM_HAVEIF_LADDRCONF
|
||||
ISC_PLATFORM_HAVEIF_LADDRREQ
|
||||
ISC_PLATFORM_HAVESCOPEID
|
||||
ISC_IPV6_C
|
||||
ISC_ISCIPV6_O
|
||||
ISC_IPV6_O
|
||||
ISC_IPV6_H
|
||||
ISC_PLATFORM_HAVESOCKADDRSTORAGE
|
||||
ISC_PLATFORM_HAVEIN6PKTINFO
|
||||
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
|
||||
ISC_PLATFORM_NEEDIN6ADDRANY
|
||||
ISC_PLATFORM_HAVEINADDR6
|
||||
ISC_PLATFORM_HAVEIPV6
|
||||
BIND9_CO_RULE
|
||||
LIBTOOL_ALLOW_UNDEFINED
|
||||
LIBTOOL_MODE_UNINSTALL
|
||||
@@ -17845,13 +17840,16 @@ $as_echo_n "checking for IPv6 structures... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct sockaddr_in6 sin6; return (0);
|
||||
|
||||
struct sockaddr_in6 sin6; return (0);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -17859,11 +17857,11 @@ _ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
found_ipv6=yes
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
found_ipv6=no
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "IPv6 support is mandatory
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
@@ -17914,26 +17912,21 @@ Please choose the proper path with the following command:
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Now delve deeper into the suitability of the IPv6 support.
|
||||
#
|
||||
case "$found_ipv6" in
|
||||
yes)
|
||||
ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_addr" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_addr" >&5
|
||||
$as_echo_n "checking for in6_addr... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct in6_addr in6; return (0);
|
||||
|
||||
struct in6_addr in6; return (0);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -17951,25 +17944,27 @@ $as_echo "no" >&6; }
|
||||
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 "$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
|
||||
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
|
||||
#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]);
|
||||
|
||||
struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
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"
|
||||
@@ -17978,28 +17973,29 @@ else
|
||||
$as_echo "no" >&6; }
|
||||
ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
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 "$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
|
||||
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
|
||||
#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]);
|
||||
|
||||
struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
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"
|
||||
@@ -18008,22 +18004,23 @@ else
|
||||
$as_echo "no" >&6; }
|
||||
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
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 "$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
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);
|
||||
|
||||
struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -18039,19 +18036,21 @@ $as_echo "no" >&6; }
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
|
||||
$as_echo_n "checking for in6_pktinfo... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct in6_pktinfo xyzzy; return (0);
|
||||
|
||||
struct in6_pktinfo xyzzy; return (0);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
@@ -18066,18 +18065,6 @@ $as_echo "no -- disabling runtime ipv6 support" >&6; }
|
||||
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
;;
|
||||
no)
|
||||
ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
|
||||
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
|
||||
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
|
||||
ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
|
||||
ISC_IPV6_H="ipv6.h"
|
||||
ISC_IPV6_O="ipv6.$O"
|
||||
ISC_ISCIPV6_O="unix/ipv6.$O"
|
||||
ISC_IPV6_C="ipv6.c"
|
||||
;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
|
||||
$as_echo_n "checking for struct sockaddr_storage... " >&6; }
|
||||
@@ -18114,11 +18101,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
|
||||
|
153
configure.in
153
configure.in
@@ -1934,16 +1934,19 @@ AC_SUBST(BIND9_CO_RULE)
|
||||
# We do the IPv6 compilation checking after libtool so that we can put
|
||||
# the right suffix on the files.
|
||||
#
|
||||
AC_MSG_CHECKING(for IPv6 structures)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>],
|
||||
[struct sockaddr_in6 sin6; return (0);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
found_ipv6=yes],
|
||||
[AC_MSG_RESULT(no)
|
||||
found_ipv6=no])
|
||||
AC_MSG_CHECKING([for IPv6 structures])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
]],
|
||||
[[
|
||||
struct sockaddr_in6 sin6; return (0);
|
||||
]])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_FAILURE([IPv6 support is mandatory])])
|
||||
|
||||
#
|
||||
# See whether IPv6 support is provided via a Kame add-on.
|
||||
@@ -1985,88 +1988,89 @@ Please choose the proper path with the following command:
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Now delve deeper into the suitability of the IPv6 support.
|
||||
#
|
||||
case "$found_ipv6" in
|
||||
yes)
|
||||
ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
|
||||
|
||||
AC_MSG_CHECKING(for in6_addr)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
],
|
||||
[struct in6_addr in6; return (0);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_MSG_CHECKING([for in6_addr])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
]],
|
||||
[[
|
||||
struct in6_addr in6; return (0);
|
||||
]])],
|
||||
[AC_MSG_RESULT([yes])
|
||||
ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
|
||||
isc_in_addr6_hack=""],
|
||||
[AC_MSG_RESULT(no)
|
||||
[AC_MSG_RESULT([no])
|
||||
ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
|
||||
isc_in_addr6_hack="#define in6_addr in_addr6"])
|
||||
|
||||
AC_MSG_CHECKING(for in6addr_any)
|
||||
AC_TRY_LINK([
|
||||
#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)
|
||||
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)
|
||||
[AC_MSG_RESULT([no])
|
||||
ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"])
|
||||
|
||||
AC_MSG_CHECKING(for in6addr_loopback)
|
||||
AC_TRY_LINK([
|
||||
#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_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_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
],
|
||||
[struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_MSG_CHECKING([for sin6_scope_id in struct sockaddr_in6])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
]],
|
||||
[[
|
||||
struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);
|
||||
]])],
|
||||
[AC_MSG_RESULT([yes])
|
||||
ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"],
|
||||
[AC_MSG_RESULT(no)
|
||||
[AC_MSG_RESULT([no])
|
||||
ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"])
|
||||
|
||||
AC_MSG_CHECKING(for in6_pktinfo)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
],
|
||||
[struct in6_pktinfo xyzzy; return (0);],
|
||||
AC_MSG_CHECKING([for in6_pktinfo])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
]],
|
||||
[[
|
||||
struct in6_pktinfo xyzzy; return (0);
|
||||
]])],
|
||||
[AC_MSG_RESULT(yes)
|
||||
ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
|
||||
[AC_MSG_RESULT(no -- disabling runtime ipv6 support)
|
||||
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
|
||||
;;
|
||||
no)
|
||||
ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
|
||||
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
|
||||
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
|
||||
ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
|
||||
ISC_IPV6_H="ipv6.h"
|
||||
ISC_IPV6_O="ipv6.$O"
|
||||
ISC_ISCIPV6_O="unix/ipv6.$O"
|
||||
ISC_IPV6_C="ipv6.c"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING(for struct sockaddr_storage)
|
||||
AC_TRY_COMPILE([
|
||||
@@ -2079,16 +2083,11 @@ ISC_PLATFORM_HAVESOCKADDRSTORAGE="#define ISC_PLATFORM_HAVESOCKADDRSTORAGE 1"],
|
||||
[AC_MSG_RESULT(no)
|
||||
ISC_PLATFORM_HAVESOCKADDRSTORAGE="#undef ISC_PLATFORM_HAVESOCKADDRSTORAGE"])
|
||||
|
||||
AC_SUBST(ISC_PLATFORM_HAVEIPV6)
|
||||
AC_SUBST(ISC_PLATFORM_HAVEINADDR6)
|
||||
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
|
||||
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
|
||||
AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
|
||||
AC_SUBST(ISC_PLATFORM_HAVESOCKADDRSTORAGE)
|
||||
AC_SUBST(ISC_IPV6_H)
|
||||
AC_SUBST(ISC_IPV6_O)
|
||||
AC_SUBST(ISC_ISCIPV6_O)
|
||||
AC_SUBST(ISC_IPV6_C)
|
||||
AC_SUBST(ISC_PLATFORM_HAVESCOPEID)
|
||||
|
||||
AC_MSG_CHECKING([for struct if_laddrreq])
|
||||
|
@@ -26,7 +26,7 @@ CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
# Alphabetically
|
||||
UNIXOBJS = @ISC_ISCIPV6_O@ unix/pk11_api.@O@ \
|
||||
UNIXOBJS = unix/pk11_api.@O@ \
|
||||
unix/app.@O@ unix/dir.@O@ unix/errno.@O@ \
|
||||
unix/errno2result.@O@ unix/file.@O@ unix/fsaccess.@O@ \
|
||||
unix/interfaceiter.@O@ unix/keyboard.@O@ unix/meminfo.@O@ \
|
||||
|
@@ -1,134 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#ifndef ISC_IPV6_H
|
||||
#define ISC_IPV6_H 1
|
||||
|
||||
/*****
|
||||
***** Module Info
|
||||
*****/
|
||||
|
||||
/*! \file isc/ipv6.h
|
||||
* \brief IPv6 definitions for systems which do not support IPv6.
|
||||
*
|
||||
* \li MP:
|
||||
* No impact.
|
||||
*
|
||||
* \li Reliability:
|
||||
* No anticipated impact.
|
||||
*
|
||||
* \li Resources:
|
||||
* N/A.
|
||||
*
|
||||
* \li Security:
|
||||
* No anticipated impact.
|
||||
*
|
||||
* \li Standards:
|
||||
* RFC2553.
|
||||
*/
|
||||
|
||||
/***
|
||||
*** Imports.
|
||||
***/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <isc/platform.h>
|
||||
|
||||
/***
|
||||
*** Types.
|
||||
***/
|
||||
|
||||
struct in6_addr {
|
||||
union {
|
||||
uint8_t _S6_u8[16];
|
||||
uint16_t _S6_u16[8];
|
||||
uint32_t _S6_u32[4];
|
||||
} _S6_un;
|
||||
};
|
||||
#define s6_addr _S6_un._S6_u8
|
||||
#define s6_addr8 _S6_un._S6_u8
|
||||
#define s6_addr16 _S6_un._S6_u16
|
||||
#define s6_addr32 _S6_un._S6_u32
|
||||
|
||||
#define IN6ADDR_ANY_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}}
|
||||
#define IN6ADDR_LOOPBACK_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}}
|
||||
|
||||
LIBISC_EXTERNAL_DATA extern const struct in6_addr in6addr_any;
|
||||
LIBISC_EXTERNAL_DATA extern const struct in6_addr in6addr_loopback;
|
||||
|
||||
struct sockaddr_in6 {
|
||||
#ifdef ISC_PLATFORM_HAVESALEN
|
||||
uint8_t sin6_len;
|
||||
uint8_t sin6_family;
|
||||
#else
|
||||
uint16_t sin6_family;
|
||||
#endif
|
||||
uint16_t sin6_port;
|
||||
uint32_t sin6_flowinfo;
|
||||
struct in6_addr sin6_addr;
|
||||
uint32_t sin6_scope_id;
|
||||
};
|
||||
|
||||
#ifdef ISC_PLATFORM_HAVESALEN
|
||||
#define SIN6_LEN 1
|
||||
#endif
|
||||
|
||||
/*%
|
||||
* Unspecified
|
||||
*/
|
||||
#define IN6_IS_ADDR_UNSPECIFIED(a) \
|
||||
(((a)->s6_addr32[0] == 0) && \
|
||||
((a)->s6_addr32[1] == 0) && \
|
||||
((a)->s6_addr32[2] == 0) && \
|
||||
((a)->s6_addr32[3] == 0))
|
||||
|
||||
/*%
|
||||
* Loopback
|
||||
*/
|
||||
#define IN6_IS_ADDR_LOOPBACK(a) \
|
||||
(((a)->s6_addr32[0] == 0) && \
|
||||
((a)->s6_addr32[1] == 0) && \
|
||||
((a)->s6_addr32[2] == 0) && \
|
||||
((a)->s6_addr32[3] == htonl(1)))
|
||||
|
||||
/*%
|
||||
* IPv4 compatible
|
||||
*/
|
||||
#define IN6_IS_ADDR_V4COMPAT(a) \
|
||||
(((a)->s6_addr32[0] == 0) && \
|
||||
((a)->s6_addr32[1] == 0) && \
|
||||
((a)->s6_addr32[2] == 0) && \
|
||||
((a)->s6_addr32[3] != 0) && \
|
||||
((a)->s6_addr32[3] != htonl(1)))
|
||||
|
||||
/*%
|
||||
* Mapped
|
||||
*/
|
||||
#define IN6_IS_ADDR_V4MAPPED(a) \
|
||||
(((a)->s6_addr32[0] == 0) && \
|
||||
((a)->s6_addr32[1] == 0) && \
|
||||
((a)->s6_addr32[2] == htonl(0x0000ffff)))
|
||||
|
||||
/*%
|
||||
* Multicast
|
||||
*/
|
||||
#define IN6_IS_ADDR_MULTICAST(a) \
|
||||
((a)->s6_addr8[0] == 0xffU)
|
||||
|
||||
/*%
|
||||
* Unicast link / site local.
|
||||
*/
|
||||
#define IN6_IS_ADDR_LINKLOCAL(a) \
|
||||
(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
|
||||
#define IN6_IS_ADDR_SITELOCAL(a) \
|
||||
(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
|
||||
|
||||
#endif /* ISC_IPV6_H */
|
@@ -36,12 +36,6 @@
|
||||
*/
|
||||
@ISC_PLATFORM_HAVESALEN@
|
||||
|
||||
/*! \brief
|
||||
* If this system has the IPv6 structure definitions, ISC_PLATFORM_HAVEIPV6
|
||||
* will be defined.
|
||||
*/
|
||||
@ISC_PLATFORM_HAVEIPV6@
|
||||
|
||||
/*! \brief
|
||||
* If this system is missing in6addr_any, ISC_PLATFORM_NEEDIN6ADDRANY will
|
||||
* be defined.
|
||||
|
@@ -412,7 +412,6 @@ ATF_TC_HEAD(udp_dscp_v6, tc) {
|
||||
atf_tc_set_md_var(tc, "descr", "udp dscp ipv6");
|
||||
}
|
||||
ATF_TC_BODY(udp_dscp_v6, tc) {
|
||||
#if defined(ISC_PLATFORM_HAVEIPV6)
|
||||
isc_result_t result;
|
||||
isc_sockaddr_t addr1, addr2;
|
||||
struct in6_addr in6;
|
||||
@@ -508,10 +507,6 @@ ATF_TC_BODY(udp_dscp_v6, tc) {
|
||||
isc_socket_detach(&s2);
|
||||
|
||||
isc_test_end();
|
||||
#else
|
||||
UNUSED(tc);
|
||||
atf_tc_skip("IPv6 not available");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Test TCP sendto/recv (IPv4) */
|
||||
@@ -618,7 +613,6 @@ ATF_TC_HEAD(tcp_dscp_v6, tc) {
|
||||
atf_tc_set_md_var(tc, "descr", "tcp dscp ipv6");
|
||||
}
|
||||
ATF_TC_BODY(tcp_dscp_v6, tc) {
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
isc_result_t result;
|
||||
isc_sockaddr_t addr1;
|
||||
struct in6_addr in6;
|
||||
@@ -717,10 +711,6 @@ ATF_TC_BODY(tcp_dscp_v6, tc) {
|
||||
isc_socket_detach(&s3);
|
||||
|
||||
isc_test_end();
|
||||
#else
|
||||
UNUSED(tc);
|
||||
atf_tc_skip("IPv6 not available");
|
||||
#endif
|
||||
}
|
||||
|
||||
ATF_TC(net_probedscp);
|
||||
|
@@ -21,7 +21,7 @@ CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
# Alphabetically
|
||||
OBJS = @ISC_IPV6_O@ pk11_api.@O@ \
|
||||
OBJS = pk11_api.@O@ \
|
||||
app.@O@ dir.@O@ errno.@O@ errno2result.@O@ \
|
||||
file.@O@ fsaccess.@O@ interfaceiter.@O@ \
|
||||
keyboard.@O@ meminfo.@O@ \
|
||||
@@ -29,7 +29,7 @@ OBJS = @ISC_IPV6_O@ pk11_api.@O@ \
|
||||
strerror.@O@ syslog.@O@ time.@O@
|
||||
|
||||
# Alphabetically
|
||||
SRCS = @ISC_IPV6_C@ pk11_api.c \
|
||||
SRCS = pk11_api.c \
|
||||
app.c dir.c errno.c errno2result.c \
|
||||
file.c fsaccess.c interfaceiter.c keyboard.c meminfo.c \
|
||||
net.c os.c resource.c socket.c stdio.c stdtime.c \
|
||||
|
@@ -397,11 +397,7 @@ internal_current4(isc_interfaceiter_t *iter) {
|
||||
memmove(&ifreq, ifrp, sizeof(ifreq));
|
||||
|
||||
family = ifreq.ifr_addr.sa_family;
|
||||
#if defined(ISC_PLATFORM_HAVEIPV6)
|
||||
if (family != AF_INET && family != AF_INET6)
|
||||
#else
|
||||
if (family != AF_INET)
|
||||
#endif
|
||||
return (ISC_R_IGNORE);
|
||||
|
||||
memset(&iter->current, 0, sizeof(iter->current));
|
||||
@@ -581,11 +577,7 @@ internal_current6(isc_interfaceiter_t *iter) {
|
||||
memmove(&lifreq, ifrp, sizeof(lifreq));
|
||||
|
||||
family = lifreq.lifr_addr.ss_family;
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
if (family != AF_INET && family != AF_INET6)
|
||||
#else
|
||||
if (family != AF_INET)
|
||||
#endif
|
||||
return (ISC_R_IGNORE);
|
||||
|
||||
memset(&iter->current, 0, sizeof(iter->current));
|
||||
|
@@ -77,10 +77,6 @@
|
||||
#include <netinet/in.h> /* Contractual promise. */
|
||||
#include <arpa/inet.h> /* Contractual promise. */
|
||||
|
||||
#ifndef ISC_PLATFORM_HAVEIPV6
|
||||
#include <isc/ipv6.h> /* Contractual promise. */
|
||||
#endif
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
@@ -88,7 +84,6 @@
|
||||
#define in6_addr in_addr6 /*%< Required for pre RFC2133 implementations. */
|
||||
#endif
|
||||
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
#ifndef IN6ADDR_ANY_INIT
|
||||
#ifdef s6_addr
|
||||
/*%
|
||||
@@ -161,7 +156,6 @@
|
||||
#define IN6_IS_ADDR_LOOPBACK(x) \
|
||||
(memcmp((x)->s6_addr, in6addr_loopback.s6_addr, 16) == 0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef AF_INET6
|
||||
/*% IPv6 */
|
||||
@@ -218,7 +212,7 @@ struct sockaddr_storage {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
|
||||
#if defined(ISC_PLATFORM_NEEDIN6ADDRANY)
|
||||
extern const struct in6_addr isc_net_in6addrany;
|
||||
/*%
|
||||
* Cope with a missing in6addr_any and in6addr_loopback.
|
||||
@@ -226,7 +220,7 @@ extern const struct in6_addr isc_net_in6addrany;
|
||||
#define in6addr_any isc_net_in6addrany
|
||||
#endif
|
||||
|
||||
#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
|
||||
#if defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
|
||||
extern const struct in6_addr isc_net_in6addrloop;
|
||||
#define in6addr_loopback isc_net_in6addrloop
|
||||
#endif
|
||||
|
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <isc/ipv6.h>
|
||||
|
||||
const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
|
||||
const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
|
@@ -93,21 +93,19 @@
|
||||
|
||||
#endif /* HAVE_SYSCTLBYNAME */
|
||||
|
||||
#if defined(ISC_PLATFORM_HAVEIPV6)
|
||||
# if defined(ISC_PLATFORM_NEEDIN6ADDRANY)
|
||||
#if defined(ISC_PLATFORM_NEEDIN6ADDRANY)
|
||||
const struct in6_addr isc_net_in6addrany = IN6ADDR_ANY_INIT;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
|
||||
#if defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
|
||||
const struct in6_addr isc_net_in6addrloop = IN6ADDR_LOOPBACK_INIT;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static isc_once_t once_ipv6only = ISC_ONCE_INIT;
|
||||
|
||||
# if defined(ISC_PLATFORM_HAVEIN6PKTINFO)
|
||||
#if defined(ISC_PLATFORM_HAVEIN6PKTINFO)
|
||||
static isc_once_t once_ipv6pktinfo = ISC_ONCE_INIT;
|
||||
# endif
|
||||
#endif /* ISC_PLATFORM_HAVEIPV6 */
|
||||
#endif
|
||||
|
||||
#ifndef ISC_CMSG_IP_TOS
|
||||
#ifdef __APPLE__
|
||||
@@ -162,7 +160,6 @@ try_proto(int domain) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
|
||||
if (domain == PF_INET6) {
|
||||
struct sockaddr_in6 sin6;
|
||||
@@ -201,7 +198,6 @@ try_proto(int domain) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
(void)close(s);
|
||||
@@ -212,11 +208,9 @@ try_proto(int domain) {
|
||||
static void
|
||||
initialize_action(void) {
|
||||
ipv4_result = try_proto(PF_INET);
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
|
||||
ipv6_result = try_proto(PF_INET6);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef ISC_PLATFORM_HAVESYSUNH
|
||||
unix_result = try_proto(PF_UNIX);
|
||||
#endif
|
||||
@@ -245,7 +239,6 @@ isc_net_probeunix(void) {
|
||||
return (unix_result);
|
||||
}
|
||||
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
static void
|
||||
try_ipv6only(void) {
|
||||
#ifdef IPV6_V6ONLY
|
||||
@@ -375,22 +368,17 @@ initialize_ipv6pktinfo(void) {
|
||||
try_ipv6pktinfo) == ISC_R_SUCCESS);
|
||||
}
|
||||
#endif /* ISC_PLATFORM_HAVEIN6PKTINFO */
|
||||
#endif /* ISC_PLATFORM_HAVEIPV6 */
|
||||
|
||||
isc_result_t
|
||||
isc_net_probe_ipv6only(void) {
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
initialize_ipv6only();
|
||||
#endif
|
||||
return (ipv6only_result);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc_net_probe_ipv6pktinfo(void) {
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
|
||||
initialize_ipv6pktinfo();
|
||||
#endif
|
||||
#endif
|
||||
return (ipv6pktinfo_result);
|
||||
}
|
||||
@@ -672,7 +660,6 @@ try_dscp_v4(void) {
|
||||
|
||||
static void
|
||||
try_dscp_v6(void) {
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
#ifdef IPV6_TCLASS
|
||||
char strbuf[ISC_STRERRORSIZE];
|
||||
struct addrinfo hints, *res0;
|
||||
@@ -726,7 +713,6 @@ try_dscp_v6(void) {
|
||||
close(s);
|
||||
|
||||
#endif /* IPV6_TCLASS */
|
||||
#endif /* ISC_PLATFORM_HAVEIPV6 */
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -2325,7 +2325,6 @@ set_rcvbuf(void) {
|
||||
ISC_SOCKADDR_LEN_T len;
|
||||
|
||||
fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
#if defined(ISC_PLATFORM_HAVEIPV6)
|
||||
if (fd == -1) {
|
||||
switch (errno) {
|
||||
case EPROTONOSUPPORT:
|
||||
@@ -2340,7 +2339,6 @@ set_rcvbuf(void) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (fd == -1)
|
||||
return;
|
||||
|
||||
@@ -2673,7 +2671,6 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
|
||||
}
|
||||
#endif /* SO_TIMESTAMP */
|
||||
|
||||
#if defined(ISC_PLATFORM_HAVEIPV6)
|
||||
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
|
||||
#ifdef IPV6_RECVPKTINFO
|
||||
/* RFC 3542 */
|
||||
@@ -2718,7 +2715,6 @@ opensocket(isc__socketmgr_t *manager, isc__socket_t *sock,
|
||||
sizeof(action));
|
||||
}
|
||||
#endif
|
||||
#endif /* ISC_PLATFORM_HAVEIPV6 */
|
||||
#endif /* defined(USE_CMSG) */
|
||||
|
||||
#if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
|
||||
|
@@ -42,7 +42,6 @@
|
||||
#define PATH_MAX _MAX_PATH
|
||||
#endif
|
||||
|
||||
#define ISC_PLATFORM_HAVEIPV6
|
||||
#if _MSC_VER > 1200
|
||||
#define ISC_PLATFORM_HAVEIN6PKTINFO
|
||||
#endif
|
||||
|
@@ -40,7 +40,7 @@
|
||||
#define ISC_NET_PORTRANGEHIGH 65535
|
||||
#endif /* ISC_NET_PORTRANGEHIGH */
|
||||
|
||||
#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
|
||||
#if defined(ISC_PLATFORM_NEEDIN6ADDRANY)
|
||||
const struct in6_addr isc_net_in6addrany = IN6ADDR_ANY_INIT;
|
||||
#endif
|
||||
|
||||
@@ -90,11 +90,9 @@ static void
|
||||
initialize_action(void) {
|
||||
InitSockets();
|
||||
ipv4_result = try_proto(PF_INET);
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
|
||||
ipv6_result = try_proto(PF_INET6);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -119,7 +117,6 @@ isc_net_probeunix(void) {
|
||||
return (ISC_R_NOTFOUND);
|
||||
}
|
||||
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
static void
|
||||
try_ipv6only(void) {
|
||||
#ifdef IPV6_V6ONLY
|
||||
@@ -259,22 +256,17 @@ initialize_ipv6pktinfo(void) {
|
||||
try_ipv6pktinfo) == ISC_R_SUCCESS);
|
||||
}
|
||||
#endif /* __notyet__ */
|
||||
#endif /* ISC_PLATFORM_HAVEIPV6 */
|
||||
|
||||
isc_result_t
|
||||
isc_net_probe_ipv6only(void) {
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
initialize_ipv6only();
|
||||
#endif
|
||||
return (ipv6only_result);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
isc_net_probe_ipv6pktinfo(void) {
|
||||
#ifdef __notyet__
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
initialize_ipv6pktinfo();
|
||||
#endif
|
||||
#endif /* __notyet__ */
|
||||
return (ipv6pktinfo_result);
|
||||
}
|
||||
|
@@ -188,11 +188,9 @@ enum {
|
||||
* to collect the destination address and interface so the client can
|
||||
* set them on outgoing packets.
|
||||
*/
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
#ifndef USE_CMSG
|
||||
#define USE_CMSG 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We really don't want to try and use these control messages. Win32
|
||||
@@ -1754,7 +1752,6 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
|
||||
if (type == isc_sockettype_udp) {
|
||||
|
||||
#if defined(USE_CMSG)
|
||||
#if defined(ISC_PLATFORM_HAVEIPV6)
|
||||
#ifdef IPV6_RECVPKTINFO
|
||||
/* 2292bis */
|
||||
if ((pf == AF_INET6)
|
||||
@@ -1786,7 +1783,6 @@ socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
|
||||
strbuf);
|
||||
}
|
||||
#endif /* IPV6_RECVPKTINFO */
|
||||
#endif /* ISC_PLATFORM_HAVEIPV6 */
|
||||
#endif /* defined(USE_CMSG) */
|
||||
|
||||
#if defined(SO_RCVBUF)
|
||||
|
Reference in New Issue
Block a user