2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 13:08:06 +00:00

1183 Commits

Author SHA1 Message Date
Ondřej Surý
a11a271b28 Assume non-broken recvmsg 2018-08-28 10:31:48 +02:00
Ondřej Surý
1672935717 Use strerror_r from POSIX.1-2001 (strerror_s on Windows) instead of custom isc__strerror() 2018-08-28 10:31:48 +02:00
Ondřej Surý
1e1804bb96 getifaddrs() is available on all supported Unix platforms (Linux, BSDs, macOS and Solaris) 2018-08-28 10:31:48 +02:00
Ondřej Surý
29c853f500 Remove check for isc_port_t; Windows never have it, Unix always have it 2018-08-28 10:31:48 +02:00
Ondřej Surý
40f7680efa Ignore sockaddr_{sin,sin6,sun}.{sin,sin6,sun}_len even on systems that define it 2018-08-28 10:31:48 +02:00
Ondřej Surý
e6dc08b06c Always assume BSD4.4 msghdr version 2018-08-28 10:31:48 +02:00
Ondřej Surý
388d6db5a1 Remove support for legacy systems without inet_{ntop,pton} w/ IPv6 support 2018-08-28 10:31:48 +02:00
Ondřej Surý
3ab9c99567 Remove support for legacy systems without in6_pktinfo 2018-08-28 10:31:48 +02:00
Ondřej Surý
8c526df306 Remove support for legacy systems without sin6_scope_id 2018-08-28 10:31:48 +02:00
Ondřej Surý
4150a86046 Remove support for legacy platforms without in6addr_loopback 2018-08-28 10:31:48 +02:00
Ondřej Surý
5083a42072 Remove support for legacy systems without in6addr_any 2018-08-28 10:31:48 +02:00
Ondřej Surý
b962f47d3e Remove support for pre-RFC2133 IPv6 implementation (in_addr6) 2018-08-28 10:31:48 +02:00
Ondřej Surý
7b21bbb7c1 Require IPv6 support from the OS 2018-08-28 10:31:47 +02:00
Ondřej Surý
00ca487fec We always want IPv6 2018-08-28 10:31:47 +02:00
Ondřej Surý
c19713aa51 Remove support for legacy SGI IRIX 2018-08-28 10:31:47 +02:00
Ondřej Surý
9f4528c623 Remove legacy support for Compaq TruCluster 2018-08-28 10:31:47 +02:00
Ondřej Surý
02e349c051 Remove legacy support for HP-UX 2018-08-28 10:31:47 +02:00
Ondřej Surý
f0f71420c8 Remove legacy support for AIX 2018-08-28 10:31:47 +02:00
Ondřej Surý
9a8da1e25a Remove legacy BSD/OS support (ipv6,various hacks) 2018-08-28 10:31:47 +02:00
Ondřej Surý
e53a72a649 Remove legacy UnixWare support (sigwait, ipv6) 2018-08-28 10:31:47 +02:00
Ondřej Surý
c692da2182 Improve autoconf pthread detection 2018-08-16 17:18:52 +02:00
Witold Kręcicki
5cdb38c2c7 Remove unthreaded support 2018-08-16 17:18:52 +02:00
Ondřej Surý
ebf3083e08 Make ENOBUFS a soft error 2018-08-13 18:51:10 +02:00
Ondřej Surý
7351c505a0 Remove duplicate config.h 2018-08-08 09:37:30 +02:00
Ondřej Surý
994e656977 Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
Ondřej Surý
cb6a185c69 Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
Ondřej Surý
64fe6bbaf2 Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants 2018-08-08 09:36:44 +02:00
Ondřej Surý
c3b8130fe8 Make OpenSSL mandatory 2018-07-19 12:47:03 -04:00
Witold Kręcicki
49f90025a0 Use completely static-sized buffers 2018-06-26 17:41:18 +02:00
Witold Kręcicki
d79be7dd5e Fix socket cmsg buffer usage 2018-06-26 17:41:18 +02:00
Ondřej Surý
99ba29bc52 Change isc_random() to be just PRNG, and add isc_nonce_buf() that uses CSPRNG
This commit reverts the previous change to use system provided
entropy, as (SYS_)getrandom is very slow on Linux because it is
a syscall.

The change introduced in this commit adds a new call isc_nonce_buf
that uses CSPRNG from cryptographic library provider to generate
secure data that can be and must be used for generating nonces.
Example usage would be DNS cookies.

The isc_random() API has been changed to use fast PRNG that is not
cryptographically secure, but runs entirely in user space.  Two
contestants have been considered xoroshiro family of the functions
by Villa&Blackman and PCG by O'Neill.  After a consideration the
xoshiro128starstar function has been used as uint32_t random number
provider because it is very fast and has good enough properties
for our usage pattern.

The other change introduced in the commit is the more extensive usage
of isc_random_uniform in places where the usage pattern was
isc_random() % n to prevent modulo bias.  For usage patterns where
only 16 or 8 bits are needed (DNS Message ID), the isc_random()
functions has been renamed to isc_random32(), and isc_random16() and
isc_random8() functions have been introduced by &-ing the
isc_random32() output with 0xffff and 0xff.  Please note that the
functions that uses stripped down bit count doesn't pass our
NIST SP 800-22 based random test.
2018-05-29 22:58:21 +02:00
Ondřej Surý
7ee8a7e69f address win32 build issues
- Replace external -DOPENSSL/-DPKCS11CRYPTO with properly AC_DEFINEd
  HAVE_OPENSSL/HAVE_PKCS11
- Don't enforce the crypto provider from platform.h, just from dst_api.c
  and configure scripts
2018-05-22 16:32:21 -07:00
Mark Andrews
6bff1768cf ISC_SOCKEVENTATTR_TRUNC was not be set 2018-05-18 15:34:48 +10:00
Ondřej Surý
3a4f820d62 Replace all random functions with isc_random, isc_random_buf and isc_random_uniform API.
The three functions has been modeled after the arc4random family of
functions, and they will always return random bytes.

The isc_random family of functions internally use these CSPRNG (if available):

1. getrandom() libc call (might be available on Linux and Solaris)
2. SYS_getrandom syscall (might be available on Linux, detected at runtime)
3. arc4random(), arc4random_buf() and arc4random_uniform() (available on BSDs and Mac OS X)
4. crypto library function:
4a. RAND_bytes in case OpenSSL
4b. pkcs_C_GenerateRandom() in case PKCS#11 library
2018-05-16 09:54:35 +02:00
Ondřej Surý
55a10b7acd Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
Michał Kępień
172d0c401e Address GCC 8 -Wformat-truncation warnings 2018-05-10 10:35:01 +02:00
Ondřej Surý
c2f42583c0 Refactor ISC_SOCKET_* defines into an isc_socket_options_t enum 2018-04-12 09:54:21 +02:00
Ondřej Surý
05a1f9f301 chg: dev: Require support for ftello/fseeko functions 2018-03-17 22:51:13 +00:00
Mark Andrews
48ca11df5f update printf format to match type 2018-02-24 17:50:41 -08:00
Mark Andrews
a04bb76973 improve the conditional declaration and use of variable to silence cppcheck 2018-02-24 17:50:41 -08:00
Ondřej Surý
a11e23b5ed Replace all usage of inet_aton() with inet_pton() 2018-02-23 13:57:10 +01:00
Ondřej Surý
843d389661 Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
Mark Andrews
34a4d241c6 shift unsigned (~0U) rather than signed (~0) contant 2018-02-16 10:20:38 +11:00
Mukund Sivaraman
f96133826e Fix various bugs reported by valgrind --tool=memcheck (#46978) 2018-01-13 00:33:35 +05:30
Tinderbox User
1883d11ca2 update copyright notice / whitespace 2018-01-11 23:45:53 +00:00
Mark Andrews
2fca8cbdff memset the remainder of sendcmsgbuf to 0 in a attempt to silence valgrind; msg->msg_control was not being set when it should have been; be consistent when setting msg->msg_control 2018-01-11 16:19:00 +11:00
Tinderbox User
099a9efd82 update copyright notice / whitespace 2018-01-09 23:45:45 +00:00
Mark Andrews
21f708c88c 4860. [bug] isc_int8_t should be signed char. [RT #46973] 2018-01-10 08:41:26 +11:00
Mark Andrews
1e10ef06ce 4855. [bug] isc_time_formatshorttimestamp produced incorrect
output. [RT #46938]
2018-01-04 09:57:40 +11:00
Tinderbox User
7bba3a7c44 update copyright notice / whitespace 2018-01-02 23:45:28 +00:00