Commit Graph

27656 Commits

Author SHA1 Message Date
Ondřej Surý
9feaf319b4 Test the AES DNS Cookie algorithm only if available 2019-07-22 09:06:03 -04:00
Ondřej Surý
a0f4e6d27e Add new siphash24 DNS Cookie algorithm
This commit changes the BIND cookie algorithms to match
draft-sury-toorop-dnsop-server-cookies-00.  Namely, it changes the Client Cookie
algorithm to use SipHash 2-4, adds the new Server Cookie algorithm using SipHash
2-4.  The change doesn't make the SipHash 2-4 to be the default algorithm, this
is up to the operator.

(cherry picked from commit 196b342bc9)
2019-07-22 09:06:03 -04:00
Michał Kępień
825497f508 Make ifconfig.sh work on DragonFly BSD
On DragonFly BSD, use the same commands for configuring network
interfaces used during system tests as on NetBSD and OpenBSD.

(cherry picked from commit 496397eb3f)
2019-07-22 08:09:49 -04:00
Ondřej Surý
63666fc926 Revise the Windows section of <isc/endian.h>
Add a comment and remove redundant definitions.

(cherry picked from commit 84ff6a6963)
2019-07-22 08:09:48 -04:00
Ondřej Surý
1fd8b2d9f4 Revise the macOS section of <isc/endian.h>
Move the macOS section of <isc/endian.h> to a lower spot as it is
believed not to be the most popular platform for running BIND.  Add a
comment and remove redundant definitions.

(cherry picked from commit c727a31eab)
2019-07-22 08:09:48 -04:00
Ondřej Surý
55a95f7cd7 Make <isc/endian.h> detect GNU rather than Linux
Instead of only supporting Linux, try making <isc/endian.h> support
other GNU platforms as well.  Since some compilers define __GNUC__ on
BSDs (e.g. Clang on FreeBSD), move the relevant section to the bottom of
the platform-specific part of <isc/endian.h>, so that it only gets
evaluated when more specific platform determination criteria are not
met.  Also include <byteswap.h> so that any byte-swapping macros which
may be defined in that file on older platforms are used in the fallback
definitions of the nonstandard hto[bl]e{16,32,64}() and
[bl]e{16,32,64}toh() conversion functions.

(cherry picked from commit a98c7408fc)
2019-07-22 08:09:48 -04:00
Ondřej Surý
7b74cd6231 Add Solaris support for <isc/endian.h>
While Solaris does not support the nonstandard hto[bl]e{16,32,64}() and
[bl]e{16,32,64}toh() conversion functions, it does have some
byte-swapping macros available in <sys/byteorder.h>.  Ensure these
macros are used in the fallback definitions of the aforementioned
nonstandard functions.

(cherry picked from commit 5b0f81e549)
2019-07-22 08:09:48 -04:00
Ondřej Surý
d3a8c162d8 Add fallback definitions to <isc/endian.h>
Since the hto[bl]e{16,32,64}() and [bl]e{16,32,64}toh() conversion
functions are nonstandard, add fallback definitions of these functions
to <isc/endian.h>, so that their unavailability does not prevent
compilation from succeeding.

(cherry picked from commit 973d2991a0)
2019-07-22 08:09:48 -04:00
Michał Kępień
3c7cab3f22 Fix <isc/endian.h> on BSD systems
Current versions of DragonFly BSD, FreeBSD, NetBSD, and OpenBSD all
support the modern variants of functions converting values between host
and big-endian/little-endian byte order while older ones might not.
Ensure <isc/endian.h> works properly in both cases.

(cherry picked from commit 588c14d5c9)
2019-07-22 08:09:48 -04:00
Ondřej Surý
07502731e0 Add tests for the isc_siphash24 function
(cherry picked from commit 2cbf633192)
(cherry picked from commit 2188a58171)
2019-07-22 08:09:48 -04:00
Ondřej Surý
91307842b8 Add reference SipHash 2-4 implementation
(cherry picked from commit a197df137a)
(cherry picked from commit 8d87ad53eb)
2019-07-22 08:09:48 -04:00
Ondřej Surý
92a86ac211 Add portable <isc/endian.h> header
(cherry picked from commit 0efc36c19a)
(cherry picked from commit 0b050ad4fd)
2019-07-22 08:09:48 -04:00
Ondřej Surý
3389e05d74 Merge branch 'ondrej-disable-freebsd-again-v9_11' into 'v9_11'
Disable FreeBSD Runner in the CI; it's broken again.

See merge request isc-projects/bind9!2175
2019-07-22 08:08:30 -04:00
Ondřej Surý
40cd655dda Disable FreeBSD Runner in the CI; it's broken again.
(cherry picked from commit 747736d361)
2019-07-22 08:07:29 -04:00
Evan Hunt
e3cc68bf35 Merge branch 'ondrej/fix-leaked-memory-in-geoip_test.c-v9_14-v9_11' into 'v9_11'
Fix leaked memory in geoip_test.c

See merge request isc-projects/bind9!2158
2019-07-16 19:55:36 -04:00
Ondřej Surý
9f431ce20c Fix the memory leaks in GeoIP unit test
Each individual test opened GeoIP databases but the database handles were never
closed.  This commit moves the open/close from the individual unit tests into
the _setup and _teardown methods where they really belong.

(cherry picked from commit d1c7b79183)
(cherry picked from commit aad88d2c00)
2019-07-16 16:27:05 -07:00
Ondřej Surý
c148ba880e Merge branch 'ondrej/move-ax-save_restore-flags-to-libtool.m4-v9_11' into 'v9_11'
Move ax save restore flags to libtool.m4 [v9_11]

See merge request isc-projects/bind9!2139
v9.11.9
2019-07-09 08:22:41 -04:00
Ondřej Surý
a848ef76f1 Add missing AX_RESTORE_FLAGS([geoip2]) to configure.ac 2019-07-09 13:54:31 +02:00
Ondřej Surý
c989144d30 Move the ax_{save,restore}_flags.m4 to libtool.m4 folder 2019-07-09 13:54:31 +02:00
Tinderbox User
2f9dae5ce9 Merge branch 'prep-release' into v9_11 2019-07-09 10:07:17 +00:00
Tinderbox User
466dd24411 prep 9.11.9 2019-07-09 10:06:34 +00:00
Mark Andrews
b152cd3436 Merge branch 'marka-nocrypto-v9_11' into 'v9_11'
add nocrypto builds

See merge request isc-projects/bind9!2136
2019-07-07 21:25:40 -04:00
Mark Andrews
e070fdab1d use printf instead of print_message for '1..0 # Skipped: sigs test requires crypto' 2019-07-08 10:57:22 +10:00
Mark Andrews
39add843ea add nocrypto builds 2019-07-08 10:21:43 +10:00
Evan Hunt
49cd121906 Merge branch '1131-geoip2-windows-911' into 'v9_11'
add support for building GeoIP2 on windows

See merge request isc-projects/bind9!2133
2019-07-04 17:42:44 -04:00
Evan Hunt
cf9c7959a0 add support for building GeoIP2 on windows 2019-07-04 12:06:01 -07:00
Evan Hunt
7af1323425 Merge branch '1114-windows-build-broken-v9_11' into 'v9_11'
fix broken windows build

See merge request isc-projects/bind9!2131
2019-07-03 14:17:06 -04:00
Evan Hunt
f81020a748 fix broken windows build
The MSVS C compiler requires every struct to have at least one member.
The dns_geoip_databases_t structure had one set of members for
HAVE_GEOIP and a different set for HAVE_GEOIP2, and none when neither
API is in use.

This commit silences the compiler error by moving the declaration of
dns_geoip_databases_t to types.h as an opaque reference, and commenting
out the contents of geoip.h when neither version of GeoIP is enabled.

(cherry picked from commit 81fcde5953)
2019-07-03 10:52:51 -07:00
Ondřej Surý
7355529a98 Merge branch 'ondrej/kyua.result-location-v9_11' into 'v9_11'
Ondrej/kyua.result location v9 11

See merge request isc-projects/bind9!2130
2019-07-03 13:46:03 -04:00
Ondřej Surý
fc7ea9cc4d Set number of parallel jobs in .gitlab-ci.yml
(cherry picked from commit f56b88f72e)
2019-07-03 19:19:01 +02:00
Ondřej Surý
d9a3bf572f Use $KYUA_RESULT in kyua report-html invocation for unified file location
(cherry picked from commit a2a69725ef)
2019-07-03 19:19:00 +02:00
Ondřej Surý
855f7642ad Merge branch 'ondrej/restore-freebsd-runner-v9_11' into 'v9_11'
[v9_11] Restore the FreeBSD Runner

See merge request isc-projects/bind9!2123
2019-07-02 17:51:03 -04:00
Ondřej Surý
6b8de5ed8f Use $(pwd) instead of $CI_PROJECT_DIR to always get absolute path
(cherry picked from commit e957825eee)
2019-07-02 22:44:30 +02:00
Ondřej Surý
ab8de89e6d Use sudo to setup the interfaces when CI job is not running as root
(cherry picked from commit 4d3e7d0b7d)
2019-07-02 22:44:29 +02:00
Evan Hunt
d1d7acaecb Add FreeBSD 11 GitLab CI Runner
(cherry picked from commit 646bb64246)
2019-07-02 22:44:29 +02:00
Evan Hunt
c65d4f9d56 Merge branch '182-geoip2-api-v9_14-v9_11' into 'v9_11'
Resolve "Update GeoIP support to new API (GeoLite2 from Maxmind)"

See merge request isc-projects/bind9!2101
2019-07-02 15:45:49 -04:00
Evan Hunt
cc92ebf6f7 CHANGES, release note, README
(cherry picked from commit 8854e284fd)
(cherry picked from commit 24103171ca)
2019-07-02 12:29:44 -07:00
Evan Hunt
babc839b31 update ARM documentation
(cherry picked from commit c9945d6148)
(cherry picked from commit d6bd7bb9af)
2019-07-02 12:29:44 -07:00
Evan Hunt
bb4b3e7f14 add geoip2 system test
(cherry picked from commit 9a1caf99ef)
(cherry picked from commit 049d8a311b)
2019-07-02 12:29:44 -07:00
Evan Hunt
8ec293e51e add GeoIP2 lookups to unit test
(cherry picked from commit 6399a70cb4)
(cherry picked from commit 7468036226)
2019-07-02 12:29:44 -07:00
Evan Hunt
0d50d9988c implement searching of geoip2 database
- revise mapping of search terms to database types to match the
  GeoIP2 schemas.
- open GeoIP2 databases when starting up; close when shutting down.
- clarify the logged error message when an unknown database type
  is configured.
- add new geoip ACL subtypes to support searching for continent in
  country databases.
- map geoip ACL subtypes to specific MMDB database queries.
- perform MMDB lookups based on subtype, saving state between
  queries so repeated lookups for the same address aren't necessary.

(cherry picked from commit 6e0b93e5a0)
(cherry picked from commit 0283ab7512)
2019-07-02 12:29:39 -07:00
Evan Hunt
a553ac45ed add HAVE_GEOIP2 #ifdef branches, without implementing yet
(cherry picked from commit fe46d5bc34)
(cherry picked from commit 7fc92bee0c)
2019-07-02 12:28:14 -07:00
Evan Hunt
7de12aaa34 add a search for GeoIP2 libraries in configure
- "--with-geoip" is used to enable the legacy GeoIP library.
- "--with-geoip2" is used to enable the new GeoIP2 library
  (libmaxminddb), and is on by default if the library is found.
- using both "--with-geoip" and "--with-geoip2" at the same time
  is an error.
- an attempt is made to determine the default GeoIP2 database path at
  compile time if pkg-config is able to report the module prefix. if
  this fails, it will be necessary to set the path in named.conf with
  geoip-directory
- Makefiles have been updated, and a stub lib/dns/geoip2.c has been
  added for the eventual GeoIP2 search implementation.

(cherry picked from commit fea6b5bf10)
(cherry picked from commit 6a7e805796)
2019-07-02 12:28:14 -07:00
Ondřej Surý
d10137736d Merge branch 'ondrej/fix-freebsd-make-v9_11' into 'v9_11'
Add rules to make sure subdirs are always built before testdirs

See merge request isc-projects/bind9!2119
2019-07-02 13:53:17 -04:00
Ondřej Surý
3e24143012 Add rules to make sure subdirs are always built before testdirs
(cherry picked from commit 723433cbc6)
2019-07-02 19:41:14 +02:00
Michał Kępień
15c2e82cca Merge branch 'michal/add-and-use-keyfile_to_key_id-helper-function-v9_11' into 'v9_11'
[v9_11] Add and use keyfile_to_key_id() helper function

See merge request isc-projects/bind9!2109
2019-06-28 08:33:32 -04:00
Michał Kępień
621f8aa90a Add and use keyfile_to_key_id() helper function
When trying to extract the key ID from a key file name, some test code
incorrectly attempts to strip all leading zeros.  This breaks tests when
keys with ID 0 are generated.  Add a new helper shell function,
keyfile_to_key_id(), which properly handles keys with ID 0 and use it in
test code whenever a key ID needs to be extracted from a key file name.

(cherry picked from commit 7d6eaad1bd)
2019-06-28 14:09:36 +02:00
Michał Kępień
ef125c0d73 Merge branch '1093-dnstap-read-clear-buffer-before-expanding-it-v9_11' into 'v9_11'
[v9_11] dnstap-read: clear buffer before expanding it

See merge request isc-projects/bind9!2107
2019-06-28 07:08:36 -04:00
Michał Kępień
207a009424 Add CHANGES entry
5260.	[bug]		dnstap-read was producing malformed output for large
			packets. [GL #1093]

(cherry picked from commit 7354207e1b)
2019-06-28 12:45:47 +02:00
Michał Kępień
511f3c3601 dnstap-read: clear buffer before expanding it
When printing a packet, dnstap-read checks whether its text form takes
up more than the 2048 bytes allocated for the output buffer by default.
If that is the case, the output buffer is automatically expanded, but
the truncated output is left in the buffer, resulting in malformed data
being printed.  Clear the output buffer before expanding it to prevent
this issue from occurring.

(cherry picked from commit 3549abe81d)
2019-06-28 12:45:44 +02:00