Commit graph

11003 commits

Author SHA1 Message Date
Ondřej Surý
9ad51fd177 Use standard OPENSSL_NO_ENGINE instead of custom USE_ENGINE define
(cherry picked from commit 8d648e7a8a)
(cherry picked from commit 311fbf3f5b)
2018-05-03 21:48:44 +02:00
Ondřej Surý
17314bc5da Use BN_hex2bn instead of custom BN_fromhex function
(cherry picked from commit 8bf192b4d1)
(cherry picked from commit 5af60f69fd)
2018-05-03 21:44:36 +02:00
Mark Andrews
dc9b77a852 simplify mask construction
(cherry picked from commit 22fab3199f)
2018-05-03 17:15:32 +02:00
Ondřej Surý
358ef09a6e Also test the higher part of the confidence interval
(cherry picked from commit 8d3220643c)
2018-05-03 15:05:20 +02:00
Ondřej Surý
c74decdf53 Workaround LibreSSL 2.7.0-2.7.2 quirk in DH_set0_key
(cherry picked from commit 6b9e3b7b06)
2018-05-03 14:27:33 +02:00
Ondřej Surý
f3414c74ec Add support for LibreSSL 2.7
(cherry picked from commit 29ff62a149)
2018-05-03 14:27:33 +02:00
Michał Kępień
911836509e Apply raw zone deltas to yet unsigned secure zones
When inline signing is enabled for a zone without creating signing keys
for it, changes subsequently applied to the raw zone will not be
reflected in the secure zone due to the dns_update_signaturesinc() call
inside receive_secure_serial() failing.  Given that an inline zone will
be served (without any signatures) even with no associated signing keys
being present, keep applying raw zone deltas to the secure zone until
keys become available in an attempt to follow the principle of least
astonishment.

(cherry picked from commit 6acf326969)
(cherry picked from commit 8a58a60772)
2018-04-25 12:09:53 -07:00
Michał Kępień
4ba247818c Only log bumped signed serial after a successful secure zone update
If a raw zone is modified, but the dns_update_signaturesinc() call in
receive_secure_serial() fails, the corresponding secure zone's database
will not be modified, even though by that time a message containing the
bumped signed serial will already have been logged.  This creates
confusion, because a different secure zone version will be served than
the one announced in the logs.  Move the relevant dns_zone_log() call so
that it is only performed if the secure zone's database is modified.

(cherry picked from commit cfbc8e264d)
(cherry picked from commit cdc7ab42b1)
2018-04-25 12:09:53 -07:00
Evan Hunt
f9da5a735e remove unnecessary comparison
(cherry picked from commit 8b1baa10ee)
2018-04-22 12:58:27 -07:00
Evan Hunt
0dcff8f93c silence warnings about unnecessary comparisons
- these are cases where result has been explicitly set, so
  if (result != ISC_R_SUCCESS) is unnecessary

(cherry picked from commit e00eb55cd2)
2018-04-22 12:58:27 -07:00
Evan Hunt
7f61e9d50e add header guards in files that were missing them
(cherry picked from commit 4247477b61)
2018-04-22 12:58:27 -07:00
Evan Hunt
694a1486ca fix shadowed global variables
(cherry picked from commit 9ca3ab1168)
2018-04-22 12:57:58 -07:00
Evan Hunt
b9db91aa64 fix duplicate include guard in dnsconf.h
- IMHO we should consider removing dnsconf.c and deprecating the
  /etc/dns.conf file, though, as I don't think it's likely anyone
  is using it

(cherry picked from commit a08ba418ef)
2018-04-22 12:57:58 -07:00
Mark Andrews
cdce9f752c remove exit calls after FATAL_ERROR
(cherry picked from commit f8d2a46daa)
2018-04-20 18:47:39 -04:00
Mark Andrews
578714e8f1 use %u instead of %d for unsigned int arguments
(cherry picked from commit 49f8e9571c)
2018-04-20 18:47:39 -04:00
Ondřej Surý
cf5598156d Sync isc_file_template functions between unix and win32, so they are same
(cherry picked from commit 8c99d104e3)
2018-04-12 09:00:13 +02:00
Ondřej Surý
6f550b33bf Cherry-pick changes to isc_file_template and associated unit test from v9_12 to v9_11
(cherry picked parts of commit 2dfb992349)
2018-04-12 08:59:35 +02:00
Mukund Sivaraman
63331f010e Fix TSIG dump keyfile name buffer size issues
(cherry picked from commit 44b84cb5a6)
2018-04-11 14:38:10 +02:00
Ondřej Surý
d69d5b96c1 Define PATH_MAX on Windows as _MAX_PATH, so we can use it everywhere
(cherry picked from commit 7467735258)
2018-04-11 14:38:10 +02:00
Evan Hunt
920eb326a5 Merge branch '183-add-dns_fixedname_initname-v9_11' into 'v9_11'
Add and use dns_fixedname_initname()

Closes #183

See merge request isc-projects/bind9!161
2018-04-10 14:08:27 -07:00
Michał Kępień
ecea678dac Use dns_fixedname_initname() where possible
Replace dns_fixedname_init() calls followed by dns_fixedname_name()
calls with calls to dns_fixedname_initname() where it is possible
without affecting current behavior and/or performance.

This patch was mostly prepared using Coccinelle and the following
semantic patch:

    @@
    expression fixedname, name;
    @@
    -	dns_fixedname_init(&fixedname);
    	...
    -	name = dns_fixedname_name(&fixedname);
    +	name = dns_fixedname_initname(&fixedname);

The resulting set of changes was then manually reviewed to exclude false
positives and apply minor tweaks.

It is likely that more occurrences of this pattern can be refactored in
an identical way.  This commit only takes care of the low-hanging fruit.

(cherry picked from commit 4df4a8e731)
(cherry picked from commit 0041aeb751)
2018-04-10 13:26:23 -07:00
Mukund Sivaraman
1dea0795d1 Add a dns_fixedname_initname() helper function
This also turns the dns_fixedname macros into functions.

(cherry picked from commit 0d2a03c290)
(cherry picked from commit cee4fef7c5)
2018-04-10 13:14:25 -07:00
Ondřej Surý
c5d1fedca8 A couple of more cleanups after free in opensslrsa_generate()
(cherry picked from commit d2b3188c61)
2018-04-06 14:23:58 +10:00
Petr Mensik
8baf990392 Do not assign NULL conditionally in OpenSSL < 1.1, make it always explicit.
(cherry picked from commit edaafacf36)
2018-04-06 14:23:58 +10:00
Petr Mensik
f36e13b039 Fix double free on RSA_generate_key_ex failure
(cherry picked from commit 01cc622e7b)
2018-04-06 14:23:57 +10:00
Mukund Sivaraman
4445ee6491 Check return value of isc_mem_get()
(cherry picked from commit de3a4af1bf)
2018-03-20 09:54:55 +11:00
Evan Hunt
09cf48603a update file headers 2018-03-15 18:38:48 -07:00
Evan Hunt
14e22ddf8c add an 'untested' case when none of the atomic operations are available
- this fixes a build failure introduced in change 4913 when
  compiling with ATF and --disable-atomic

(cherry picked from commit 1b3eac926e)
2018-03-15 12:09:38 -07:00
Evan Hunt
8b205089b7 update file headers to remove copyright years 2018-03-14 16:40:20 -07:00
Ondřej Surý
413b7d4b24 Update whitespace 2018-03-14 12:45:03 +01:00
Evan Hunt
e98ec51b96 Fix compiler warnings and test failures when building without threads
(cherry picked from commit 56353aaf42)
2018-03-10 10:37:20 -08:00
Evan Hunt
8da54db729 Merge branch 'clean-bin-tests' into 'v9_11'
clean up bin/tests, convert unit tests to ATF

Closes #115

See merge request isc-projects/bind9!93
2018-03-09 16:47:51 -08:00
Evan Hunt
442c1530a3 final cleanup
- update Kyuafiles to match Atffiles
- copyrights
- CHANGES note

(cherry picked from commit 86e00cbb71)
(cherry picked from commit 80834b5b90)
2018-03-09 16:17:56 -08:00
Evan Hunt
941946cf14 remove lib/tests as nothing uses it anymore
(cherry picked from commit d132f73497)
(cherry picked from commit d35f62434a)
2018-03-09 15:48:32 -08:00
Evan Hunt
64ea21a0e5 shorten ht_test and random_test
(cherry picked from commit 9b753aa154)
(cherry picked from commit 289836a066)
2018-03-09 15:47:21 -08:00
Evan Hunt
57a5820dcc migrate t_dst signature test to lib/dns/tests/dst_test
(cherry picked from commit a4ebe83cdb)
(cherry picked from commit 4439c471d1)
2018-03-09 15:46:53 -08:00
Evan Hunt
d3518e57b1 migrate t_db to lib/dns/tests/db_test
(cherry picked from commit f58ac8ada3)
(cherry picked from commit 56da937399)
2018-03-09 15:42:07 -08:00
Evan Hunt
b2fef3b438 migrate t_names to lib/dns/tests/name_test
(cherry picked from commit 8ecf69ef7b)
(cherry picked from commit aefad99e1e)
2018-03-09 15:40:21 -08:00
Evan Hunt
42fa3932ab migrate t_rbt to lib/dns/tests/rbt_test
(cherry picked from commit 109546cbda)
(cherry picked from commit c505afd183)
2018-03-09 15:39:42 -08:00
Evan Hunt
38f9cddcad migrate t_tasks to lib/isc/tests/task_test
(cherry picked from commit c6c1e99252)
(cherry picked from commit 88bfe56876)
2018-03-09 15:38:53 -08:00
Evan Hunt
5dd25f2285 migrate t_resolver to lib/dns/tests/resolver_test
(cherry picked from commit d80825c40b)
(cherry picked from commit 30e157f6e4)
2018-03-09 15:38:30 -08:00
Evan Hunt
274ee0b425 migrate t_timers to lib/isc/tests/timer_test
(cherry picked from commit e2b8699df9)
(cherry picked from commit efccdad0ea)
2018-03-09 15:37:03 -08:00
Evan Hunt
492e19d6ec migrate t_atomic to lib/isc/tests/atomic_test
(cherry picked from commit 874e2fc70c)
(cherry picked from commit c7fa56e8db)
2018-03-09 15:35:09 -08:00
Evan Hunt
814cd21e22 migrate t_mem to lib/isc/tests/mem_test
(cherry picked from commit 979f054702)
(cherry picked from commit af48544b75)
2018-03-09 15:34:31 -08:00
Evan Hunt
faedafd2b4 migrate t_net to lib/isc/tests
(cherry picked from commit 05b7251d51)
(cherry picked from commit af0c9b2cee)
2018-03-09 15:33:48 -08:00
Evan Hunt
323e2f7152 migrate t_sockaddr to lib/isc/tests
(cherry picked from commit 62f650078a)
(cherry picked from commit fadb93cf43)
2018-03-09 15:33:01 -08:00
Evan Hunt
fb076e0591 allow ATF tests to run in parallel
(cherry picked from commit ef0b4c91bc)
(cherry picked from commit 787c5d1394)
2018-03-09 14:37:46 -08:00
Evan Hunt
3b559cf7f0 Merge branch 'v9_11_3_patch' into v9_11 2018-03-08 14:29:24 -08:00
Mark Andrews
229e9e2215 check for in-view zones colliding with other zone definitions; also check the syntax of the in-view zone name
(cherry picked from commit 3e7e280040)
2018-03-08 12:20:59 +11:00
Michał Kępień
8f07fb476b Remove duplicate irs_resconf_load() unit test
The "sortlist-v4.conf" unit test for irs_resconf_load() is always run
twice due to a duplicate entry in the "tests" table.  Remove one of them
to prevent this.

(cherry picked from commit 6c09f305ae)
2018-03-06 09:24:41 +01:00
Michał Kępień
b4a10e77ea Do not ignore resolv.conf syntax errors
irs_resconf_load() stores the value returned by add_search() into ret
without consulting its current value first.  This causes any previous
errors raised while parsing resolv.conf to be ignored as long as any
"domain" or "search" statement is present in the file.

Prevent this by returning early in case an error is detected while
parsing resolv.conf.  Ensure that "searchlist" and "magic" members of
the created irs_resconf_t structure are always initialized before
isc_resconf_destroy() is called.

(cherry picked from commit 1f400b68a8)
2018-03-06 09:24:41 +01:00
Tinderbox User
c80e152862 prep 9.11.3rc2 2018-03-02 21:53:14 +00:00
Evan Hunt
8d1b3ceb4d temporarily revert change #4859 2018-03-02 12:16:31 -08:00
Evan Hunt
95c01ddde2 temporarily revert change #4859
(cherry picked from commit 84ec07999f)
2018-03-02 12:02:49 -08:00
Evan Hunt
0be726b440 minor cleanup and addressed a sprintf format warning
(cherry picked from commit ab0fe63f07)
2018-02-26 10:45:13 +11:00
Mark Andrews
bf79ae278c update printf format to match type
(cherry picked from commit 48ca11df5f)
2018-02-26 10:40:11 +11:00
Mark Andrews
4d8e501abe improve the conditional declaration and use of variable to silence cppcheck
(cherry picked from commit a04bb76973)
2018-02-26 10:40:11 +11:00
Mark Andrews
ae50b73d78 remove deadcode
(cherry picked from commit b71a1386ed)
2018-02-26 10:40:10 +11:00
Mark Andrews
ded99ca751 silence unread assignment warning by using POST macro
(cherry picked from commit e8249dcd49)
2018-02-26 10:40:10 +11:00
Mark Andrews
2c53a82644 update the sscanf format strings so they match the pointer types
(cherry picked from commit 70d192eb97)
2018-02-26 10:40:10 +11:00
Mark Andrews
77819f7d75 redefine CHECK so cppcheck see the definition
(cherry picked from commit a4186b1867)
2018-02-26 10:40:10 +11:00
Mark Andrews
edbca5937c conditionally typedef fstrmtable
(cherry picked from commit dcd309bea1)
2018-02-26 10:40:09 +11:00
Mark Andrews
82b109bf5d adjust goto target and conditional compilation so that cleanup_spillattimer and cleanup_alglock labels match the element to be cleanup and so that they are always used
(cherry picked from commit 7b27be54ee)
2018-02-26 10:40:09 +11:00
Petr Menšík
6d9b38e9fe unit/unittest.sh is generated by configure. It will always be
generated into builddir. If out-of-tree build is used, make unit
will always fail. Kyuafiles and testdata still have to be copied
manually into the builddir.

(cherry picked from commit 95cde3608a)
2018-02-23 15:50:33 -08:00
Petr Menšík
6876501605 Reuse new function from rt46864 for similar block elsewhere.
(cherry picked from commit e7a93321f0)
(cherry picked from commit cb98ce8e67)
2018-02-23 13:52:43 -08:00
Michał Kępień
5c080dfe73 Do not recheck DNS_ZONEFLG_LOADPENDING in zone_asyncload()
Remove a block of code which dates back to commit 8a2ab2b920, when
dns_zone_asyncload() did not yet check DNS_ZONEFLG_LOADPENDING.
Currently, no race in accessing DNS_ZONEFLG_LOADPENDING is possible any
more, because:

  - dns_zone_asyncload() is still the only function which may queue
    zone_asyncload(),

  - dns_zone_asyncload() accesses DNS_ZONEFLG_LOADPENDING under a lock
    (and potentially queues an event under the same lock),

  - DNS_ZONEFLG_LOADPENDING is not cleared until the load actually
    completes.

Thus, the rechecking code can be safely removed from zone_asyncload().

Note that this also brings zone_asyncload() to a state in which the
completion callback is always invoked.  This is required to prevent
leaking memory in case something goes wrong in zone_asyncload() and a
zone table the zone belongs to is indefinitely left with a positive
reference count.
2018-02-16 08:58:24 +01:00
Michał Kępień
4d391101a4 Asynchronous zone load events have no way of getting canceled
Code handling cancellation of asynchronous zone load events was likely
copied over from other functions when asynchronous zone loading was
first implemented in commit 8a2ab2b920.  However, unlike those other
functions, asynchronous zone loading events currently have no way of
getting canceled once they get posted, which means the aforementioned
code is effectively dead.  Remove it to prevent confusion.
2018-02-16 08:58:24 +01:00
Michał Kępień
749b3cacfc Only clear DNS_ZONEFLG_LOADPENDING in zone_asyncload() if zone loading is completed immediately
zone_load() is not always synchronous, it may only initiate an
asynchronous load and return DNS_R_CONTINUE, which means zone loading
has not yet been completed.  In such a case, zone_asyncload() must not
clear DNS_ZONEFLG_LOADPENDING immediately and leave that up to
zone_postload().
2018-02-16 08:58:24 +01:00
Michał Kępień
e0205aac03 Lock zone before checking whether its asynchronous load is already pending
While this is not an issue in named, which only calls
dns_zone_asyncload() from task-exclusive mode, this function is exported
by libdns and thus may in theory be concurrently called for the same
zone by multiple threads.  It also does not hurt to be consistent
locking-wise with other DNS_ZONEFLG_LOADPENDING accesses.
2018-02-16 08:58:24 +01:00
Mark Andrews
ad5550c029 add POST(len); 2018-02-16 15:08:25 +11:00
Mark Andrews
65cfe7e1ad conditionally declare stacksize 2018-02-16 15:08:24 +11:00
Mark Andrews
027bc5535c add POST(len); 2018-02-16 15:08:24 +11:00
Mark Andrews
bdf5c08fc4 Clarify calculation precedence for '&' and '?' 2018-02-16 15:08:24 +11:00
Mark Andrews
2c85b9afd7 add POST(tl) 2018-02-16 15:08:24 +11:00
Mark Andrews
118203925a conditionally declare strbuf 2018-02-16 15:06:51 +11:00
Mark Andrews
c2e6e799b3 test for == 0 rather than <= as value is unsigned 2018-02-16 15:00:06 +11:00
Mark Andrews
22c6b2308e use %u instead of %d 2018-02-16 14:58:17 +11:00
Mark Andrews
c58169ff1c use %u instead of %d 2018-02-16 14:58:17 +11:00
Mark Andrews
8db1762d68 use %u instead of %d 2018-02-16 14:58:17 +11:00
Mark Andrews
f6dae15117 use %u instead of %d 2018-02-16 14:58:17 +11:00
Mark Andrews
8d9097b0b7 use %u instead of %d 2018-02-16 14:58:17 +11:00
Mark Andrews
54672c31b9 use %u instead of %d 2018-02-16 14:54:36 +11:00
Mark Andrews
262d514345 use %u instead of %d 2018-02-16 14:54:36 +11:00
Mark Andrews
8c51ba3aac use %u instead of %d 2018-02-16 14:54:36 +11:00
Mark Andrews
8dba09602b case to unsigned; reorder expression 2018-02-16 14:52:51 +11:00
Mark Andrews
012ae8afa2 simplify expression 2018-02-16 14:45:20 +11:00
Mark Andrews
0ae4bf22d2 use %u and preserve unsigned property 2018-02-16 14:45:20 +11:00
Mark Andrews
7873680877 cast to unsigned 2018-02-16 14:36:56 +11:00
Mark Andrews
ea6732c354 preserve unsigned property 2018-02-16 14:36:56 +11:00
Mark Andrews
c57610f1cc make both arguments of & unsigned 2018-02-16 14:36:56 +11:00
Mark Andrews
faf0e3ff65 use %u instead of %d 2018-02-16 14:36:56 +11:00
Mark Andrews
ab0805b73e shift unsigned (~0U) rather than signed (~0) contant 2018-02-16 14:35:36 +11:00
Mark Andrews
4b83e4e105 use %u instead of %d 2018-02-16 14:35:36 +11:00
Mark Andrews
351a27ef5b unsigned constants 2018-02-16 14:35:36 +11:00
Mark Andrews
e6cd8a52aa unsigned constants 2018-02-16 14:34:18 +11:00
Mark Andrews
9cc1ea9566 use %u instead of %d 2018-02-16 14:32:24 +11:00
Mark Andrews
2bbdfaaa0a use %u instead of %d 2018-02-16 14:32:24 +11:00
Mark Andrews
95657b047e use %u instead of %d 2018-02-16 14:32:24 +11:00
Mark Andrews
42c12e6b81 INSIST ipnum6 != NULL 2018-02-16 14:29:27 +11:00
Mark Andrews
cd86c23e87 use %u instead of %d 2018-02-16 14:29:27 +11:00
Mark Andrews
ca60688cb1 use %u instead of %d 2018-02-16 14:29:27 +11:00
Mark Andrews
39142beb63 test for >= 0 and use %d instead of %u 2018-02-16 14:29:27 +11:00
Mark Andrews
a0adc34f3b formally cast to int; use %u instead of %d 2018-02-16 14:29:27 +11:00
Mark Andrews
61f81fde94 formally cast to int 2018-02-16 14:29:27 +11:00
Evan Hunt
d77cb075aa [v9_11] prep 9.11.3rc1 2018-02-15 11:16:15 -08:00
Evan Hunt
785d8ad324 [rt43670] more emphatic warning 2018-02-09 12:33:43 +11:00
Mark Andrews
30ca20f720 4889. [func] Warn about the use of old root keys without the new
root key being present.  Warn about dlv.isc.org's
                        key being present. Warn about both managed and
                        trusted root keys being present. [RT #43670]

(cherry picked from commit baef0ca988)
2018-02-09 12:33:42 +11:00
Tinderbox User
83545641dd update copyright notice / whitespace 2018-02-08 23:48:55 +00:00
Mark Andrews
701a93f5a5 [v9_11] fix nsupdate test on windows
4888.	[test]		Initialize sockets correctly in sample-update so
			that nsupdate system test will will run on Windows.
			[RT #47097]

(cherry picked from commit 6757dc6488)
2018-02-08 13:35:43 -08:00
Tinderbox User
fccc836ebf update copyright notice / whitespace 2018-02-07 23:48:20 +00:00
Mark Andrews
8f1ed05dc0 4885. [security] update-policy rules that otherwise ignore the name
field now require that it be set to "." to ensure
                        that any type list present is properly interpreted.
                        [RT #47126]

(cherry picked from commit ec771bbdc8)
2018-02-07 13:50:00 +11:00
Tinderbox User
9b63f75476 update copyright notice / whitespace 2018-02-01 23:49:05 +00:00
Michał Kępień
40aa5cab12 [v9_11] Silence compiler warnings about comparisons between signed and unsigned integers [RT #46980]
(cherry picked from commit a3c2b8831e)
2018-02-01 21:29:17 +01:00
Tinderbox User
3c5862dfc7 update copyright notice / whitespace 2018-01-30 23:48:16 +00:00
Mark Andrews
73cf0ba4e8 4882. [bug] Address potential memory leak in
dns_update_signaturesinc. [RT #47084]

(cherry picked from commit 7817caa3c7)
2018-01-30 15:28:56 +11:00
Mark Andrews
d8351dfc9b 4881. [bug] Only include dst_openssl.h when OpenSSL is required.
[RT #47068]

(cherry picked from commit a64503c736)
2018-01-30 15:28:51 +11:00
Mark Andrews
5c78f1f50e 4879. [bug] dns_rdata_caa:value_len is was small. [RT #47086]
(cherry picked from commit 3ae586b857)
2018-01-30 11:00:44 +11:00
Mark Andrews
5bcd0fe019 copyrights 2018-01-25 16:47:34 +11:00
Mark Andrews
31c7ab4fb3 4811. [bug] Revert api changes to use <isc/buffer.h> inline
macros.  Provide a alternative mechanism to turn
                        on the use of inline macros when building BIND.
                        [RT #46520]

(cherry picked from commit a1a5145867)
2018-01-25 16:42:37 +11:00
Tinderbox User
574176a88d update copyright notice / whitespace 2018-01-24 23:47:27 +00:00
Evan Hunt
f6ea3eaf82 [v9_11] change uint to isc_uint to fix build failure on windows 2018-01-24 10:59:57 -08:00
Evan Hunt
a48e2d4155 [v9_11] update 9.11 api range 2018-01-24 10:24:17 -08:00
Evan Hunt
ad309e8dfa [v9_11] prep 9.11.3b1 2018-01-24 10:21:04 -08:00
Evan Hunt
567aab801d [v9_11] copyrights 2018-01-24 09:50:56 -08:00
Mark Andrews
635e4351b0 4876. [bug] Address deadlock with accessing a keytable. [RT #47000]
(cherry picked from commit b575c4ec42)
2018-01-24 18:56:34 +11:00
Mark Andrews
fc04365d2f 4875. [bug] Address compile failures on older systems. [RT #47015]
(cherry picked from commit 99178b6329)
2018-01-24 13:10:44 +11:00
Mark Andrews
7cbac360bf 4874. [bug] Wrong time display when reporting new keywarntime.
[RT #47042]

(cherry picked from commit 83d005de61)
2018-01-24 08:00:30 +11:00
Tinderbox User
93ca8abdf8 update copyright notice / whitespace 2018-01-22 23:47:25 +00:00
Evan Hunt
92b0a89969 [v9_11] fix test failure by sorting "type" to the top of zone clauses 2018-01-22 13:19:19 -08:00
Evan Hunt
40354825af [v9_11] silence warning 2018-01-22 13:07:41 -08:00
Evan Hunt
57137377ef [v9_11] fix unresolved externals for win32 2018-01-22 11:46:45 -08:00
Evan Hunt
1cf118a656 [v9_11] automatically generate named.conf grammars for the ARM
4873.	[doc]		Grammars for named.conf included in the ARM are now
			automatically generated by the configuration parser
			itself.  As a side effect of the work needed to
			separate zone type grammars from each other, this
			also makes checking of zone statements in
			named-checkconf more correct and consistent.
			[RT #36957]

(cherry picked from commit 129c4414cb)
(cherry picked from commit f662d5484e)
2018-01-22 19:40:00 +00:00
Mukund Sivaraman
6fb3db01ac Don't permit loading meta RR types such as TKEY from master files (#47009)
(cherry picked from commit 8a4ce20172)
(cherry picked from commit c8eb726046)
2018-01-22 14:36:18 +05:30
Tinderbox User
b68401ccae update copyright notice / whitespace 2018-01-21 23:47:14 +00:00
Mark Andrews
2cf0fe3b80 4869. [bug] Address some cases where NULL with zero length could
be passed to memmove which is undefined behaviour and
                        can lead to bad optimisation. [RT #46888]

(cherry picked from commit fdd8838bf9)
2018-01-22 09:39:25 +11:00
Tinderbox User
9eb24f1f84 update copyright notice / whitespace 2018-01-17 23:47:10 +00:00
Francis Dupont
2d387429a1 bcmp -> memcmp 2018-01-17 15:32:43 +01:00
Francis Dupont
ded782a862 Merged rt46864 (check MD5 amd SHA1 support) 2018-01-17 14:41:58 +01:00
Francis Dupont
f9c410d937 Merged rt46864 (check MD5 amd SHA1 support) 2018-01-17 14:40:13 +01:00
Tinderbox User
2927284144 update copyright notice / whitespace 2018-01-15 23:47:32 +00:00
Michał Kępień
e526027287 [v9_11] Ensure all master definitions in a catalog zone contain an IP address
4864.	[bug]		named acting as a slave for a catalog zone crashed if
			the latter contained a master definition without an IP
			address. [RT #45999]

(cherry picked from commit ae51a676c9)
2018-01-15 20:52:54 +01:00
Tinderbox User
a853d87fc4 update copyright notice / whitespace 2018-01-13 23:48:14 +00:00
Mukund Sivaraman
929329d2d6 Fix various bugs reported by valgrind --tool=memcheck (#46978)
(cherry picked from commit f96133826e)
(cherry picked from commit 0374e1c3fd)
2018-01-13 11:47:46 +05:30
Tinderbox User
82ddae820c update copyright notice / whitespace 2018-01-10 23:50:06 +00:00
Mark Andrews
ec29d217ba 4862. [bug] The rdata flags for RRSIG was not being properly set
when constructing a rdataslab. [RT #46978]

(cherry picked from commit 7befb67af4)
2018-01-11 09:54:20 +11:00
Tinderbox User
5470c1cc10 update copyright notice / whitespace 2018-01-09 23:47:12 +00:00
Mark Andrews
afefd75473 4861. [bug] The isc_crc64 unit test was not endian independent.
[RT #46973]

(cherry picked from commit 0ce212b9f5)
2018-01-10 09:46:54 +11:00
Mark Andrews
f0353a586c 4860. [bug] isc_int8_t should be signed char. [RT #46973]
(cherry picked from commit 21f708c88c)
2018-01-10 08:42:21 +11:00
Tinderbox User
dc2a85bed7 update copyright notice / whitespace 2018-01-04 23:46:19 +00:00
Mark Andrews
3b8a3c43a0 unconditionally typedef summarystat_t for coverity
(cherry picked from commit a0e66ef6dd)
2018-01-05 10:11:21 +11:00
Evan Hunt
7ff28f5bef [v9_11] block validator deadlock and prevent use-after-free
4859.	[bug]		A loop was possible when attempting to validate
			unsigned CNAME responses from secure zones;
			this caused a delay in returning SERVFAIL and
			also increased the chances of encountering
			CVE-2017-3145. [RT #46839]

4858.	[security]	Addresses could be referenced after being freed
			in resolver.c, causing an assertion failure.
			(CVE-2017-3145) [RT #46839]
2018-01-03 19:19:46 -08:00
Tinderbox User
d2017ba188 update copyright notice / whitespace 2018-01-03 23:46:13 +00:00
Mark Andrews
33506bef10 missing newline in comment
(cherry picked from commit 7258b852cf)
2018-01-03 17:11:50 +11:00
Tinderbox User
09b9db3c91 update copyright notice / whitespace 2018-01-02 23:46:09 +00:00
Mark Andrews
c3237dec87 4852. [bug] Handle strftime() failing in isc_time_formatISO8601ms.
Add REQUIRE's and INSIST's to isc_time_formattimestamp,
                        isc_time_formathttptimestamp, isc_time_formatISO8601,
                        isc_time_formatISO8601ms. [RT #46892]
2018-01-02 10:46:41 +11:00
Tinderbox User
335466db9e regen v9_11 2017-12-29 02:23:11 +00:00
Mark Andrews
3c3d824db7 initalize sigsize to zero; ATF_CHECK_EQ(sigsize, tsig.siglen);
(cherry picked from commit 9f61f6b46b)
2017-12-22 08:59:03 +11:00
Mark Andrews
0c38c73c4c don't attempt to call isc_buffer_free(&buf) twice; don't attempt to call dns_message_destroy(&msg) twice; don't test for key != NULL
(cherry picked from commit cb8650d875)
2017-12-12 13:24:59 +11:00
Mark Andrews
2d82ed9456 4842. [bug] Conditionally compile opensslecdsa_link.c to avoid
warnings about unused function. [RT #46790]

(cherry picked from commit 63459cdc05)
2017-12-07 13:31:57 +11:00
Tinderbox User
a1cf2291a9 update copyright notice / whitespace 2017-12-06 23:46:07 +00:00
Mark Andrews
a5a1cbece4 4841. [bug] Address -fsanitize=undefined warnings. [RT #46786]
(cherry picked from commit 9d5a0abe81)
2017-12-06 21:02:24 +11:00
Mukund Sivaraman
16f43564c6 Backport performance work to 9.11 (#45637) 2017-12-06 10:35:21 +05:30
Mark Andrews
e01ef6f01c 4839. [bug] zone.c:zone_sign was not properly determining
if there were active KSK and ZSK keys for
                        a algorithm when update-check-ksk is true
                        (default) leaving records unsigned with one or
                        more DNSKEY algorithms. [RT #46774]

(cherry picked from commit 00f5ea91cf)
2017-12-05 16:11:53 +11:00
Mark Andrews
677f507de7 4838. [bug] zone.c:add_sigs was not properly determining
if there were active KSK and ZSK keys for
                        a algorithm when update-check-ksk is true
                        (default) leaving records unsigned with one or
                        more DNSKEY algorithms. [RT #46754]

(cherry picked from commit 6fa2a0691e)
2017-12-05 09:32:50 +11:00
Mark Andrews
bf459d24a1 4837. [bug] dns_update_signatures{inc} (add_sigs) was not
properly determining if there were active KSK and
                        ZSK keys for a algorithm when update-check-ksk is
                        true (default) leaving records unsigned. [RT #46743]

(cherry picked from commit 196e01da5f)
2017-12-04 10:04:58 +11:00
Tinderbox User
701e9f3149 update copyright notice / whitespace 2017-11-30 23:46:50 +00:00
Evan Hunt
4a5dfa2d51 [v9_11] silence compiler warning
(cherry picked from commit 49a8cd6c01)
2017-11-30 13:55:49 -08:00
Ondřej Surý
c62d9ac65f [v9_11] Type the shifted values to isc_uint32_t so the top bit is unsigned (found by UBSAN) [RT #46740]
(cherry picked from commit a4a148cf9a)
2017-11-30 18:27:07 +01:00
Michał Kępień
81e3e30849 [v9_11] Fix LMDB support on OpenBSD; clean up and refactor LMDB-related code
4835.   [cleanup]       Clean up and refactor LMDB-related code. [RT #46718]

4834.   [port]          Fix LMDB support on OpenBSD. [RT #46718]

(cherry picked from commit 2c20fc0d13)
2017-11-30 14:34:43 +01:00
Tinderbox User
341ab4071f update copyright notice / whitespace 2017-11-29 23:46:06 +00:00
Mark Andrews
64d7fa3ec4 4833. [bug] isc_event_free should check that the event is not
linked when called. [RT #46725]

4832.   [bug]           Events were not being removed from zone->rss_events.
                        [RT #46725]

(cherry picked from commit 9ddf7d6c4c)
2017-11-30 10:38:46 +11:00
Mark Andrews
75505befa9 4831. [bug] Convert the RRSIG expirytime to 64 bits for
comparisions in diff.c:resign. [RT #46710]

(cherry picked from commit 0579a11658)
2017-11-29 15:20:49 +11:00
Tinderbox User
acbc29f414 update copyright notice / whitespace 2017-11-28 23:46:12 +00:00
Mark Andrews
39d5523a8a 4829. [bug] isc_heap_delete did not zero the index value when
the heap was created with a callback to do that.
                        [RT #46709]

(cherry picked from commit 65a483106e)
2017-11-28 18:50:36 +11:00
Mark Andrews
0adaa6be4b #define update_recordsandbytes update_recordsandbytes64 2017-11-28 14:14:04 +11:00
Mark Andrews
f98a58d9e6 map more entry points to <name>64 2017-11-28 14:13:17 +11:00
Tinderbox User
4c713bf940 update copyright notice / whitespace 2017-11-27 23:47:09 +00:00
Mark Andrews
eb59c7d35b restore setting header->heap_index to zero in setsigningtime
(cherry picked from commit c22b540e4c)
2017-11-28 06:47:06 +11:00
Michał Kępień
1f4a3c7088 [v9_11] Do not use thread-local storage for storing LMDB reader locktable slots
4828.	[bug]		Do not use thread-local storage for storing LMDB reader
			locktable slots. [RT #46556]

(cherry picked from commit 40a90fbf89)
2017-11-27 09:48:49 +01:00
Mark Andrews
89085bebd3 More:
4819.   [bug]           Fully backout the transaction when adding a RRset
                        to the resigning / removal heaps fails. [RT #46473]

(cherry picked from commit 19f6a63184)
2017-11-27 15:22:20 +11:00
Mark Andrews
cae9332121 add missing symbols 2017-11-27 14:04:47 +11:00
Mark Andrews
295a6bb5df silence %lu vs size_t warning by casting to (unsigned long)
(cherry picked from commit 1dc8208a89)
2017-11-24 10:26:35 +11:00
Mark Andrews
55abc014f7 in rdbdb.c:setsigningtime stop breaking heap invariant property unless we are going to restore the invariant property
(cherry picked from commit 6ead410268)
2017-11-24 08:51:01 +11:00
Michał Kępień
57b1d64d9a [v9_11] Prevent bogus warning from being logged
4825.	[bug]		Prevent a bogus "error during managed-keys processing
			(no more)" warning from being logged. [RT #46645]

(cherry picked from commit 165df18f75)
2017-11-23 09:37:08 +01:00
Mark Andrews
de9c02bbe8 silence compiler warning [RT #46471] 2017-11-23 17:02:31 +11:00
Michał Kępień
2d517e233f [v9_11] Refactor reclimit system test
4823.	[test]		Refactor reclimit system test to improve its
			reliability and speed. [RT #46632]

(cherry picked from commit 6035d557c4)
2017-11-21 10:33:08 +01:00
Tinderbox User
7d4205bea9 update copyright notice / whitespace 2017-11-17 23:46:02 +00:00
Mark Andrews
13bd0e3159 remove out of date comment
(cherry picked from commit a197094d76)
2017-11-18 08:51:57 +11:00
Mark Andrews
86d2f9abc8 4821. [bug] When resigning ensure that the SOA's expire time is
always later that the resigning time of other records.
                        [RT #46473]

4820.   [bug]           dns_db_subtractrdataset should transfer the resigning
                        information to the new header. [RT #46473]

4819.   [bug]           Fully backout the transaction when adding a RRset
                        to the resigning / removal heaps fail. [RT #46473]

(cherry picked from commit 656eed7c9b)
2017-11-18 07:21:28 +11:00
Tinderbox User
67a1122d50 update copyright notice / whitespace 2017-11-14 23:46:28 +00:00
Mark Andrews
953b3882cc whitespace
(cherry picked from commit bcce55197a)
2017-11-14 14:49:07 +11:00
Mark Andrews
ce37f22724 more DNS_NAME_INITABSOLUTE cases
(cherry picked from commit e2f9dcfd86)
2017-11-14 11:52:45 +11:00
Tinderbox User
9b68b948f6 update copyright notice / whitespace 2017-11-13 23:46:08 +00:00
Mark Andrews
3ed16e796d 4817. [cleanup] Use DNS_NAME_INITABSOLUTE and DNS_NAME_INITNONABSOLUTE.
[RT #45433]

(cherry picked from commit 3d905e0533)
2017-11-13 17:16:31 +11:00
Mark Andrews
70e041bea1 4815. [bug] rbt_test.c:insert_and_delete needed to call
dns_rbt_addnode instead of dns_rbt_addname. [RT #46553]

(cherry picked from commit 04934b28ea)
2017-11-13 15:27:12 +11:00
Michał Kępień
eeb919b6f5 [v9_11] Minor improvements to code handling managed keys
4812.	[bug]		Minor improvements to stability and consistency of code
			handling managed keys. [RT #46468]

(cherry picked from commit 312c84c73a)
2017-11-09 15:19:32 +01:00
Michał Kępień
79d54c20ad [v9_11] Prevent junk from being logged when using "also-notify { <ip> key <keyname>; };"
(cherry picked from commit 4034b098d8)
2017-11-08 09:22:01 +01:00
Mark Andrews
f8362536c6 4805. [bug] TCP4Active and TCP6Active weren't being updated
correctly. [RT #46454]

(cherry picked from commit 92bbc9914c)
2017-11-02 10:43:18 +11:00
Mark Andrews
0401db53f9 don't use the ERR macro as GCC 7 only does a partial static analysis which generates false positives for fallthrough. [RT #46115]
(cherry picked from commit 0698ad8503)
2017-11-01 19:19:10 +11:00
Tinderbox User
9159c4c80c update copyright notice / whitespace 2017-10-31 23:46:45 +00:00
Mark Andrews
24231e53a5 4804. [port] win32: access() does not work on directories as
required by POSIX.  Supply a alternative in
                        isc_file_isdirwritable. [RT #46394]
2017-11-01 09:39:08 +11:00
Michał Kępień
4b669b69ba [v9_11] Backport fix for RT #46055 and mkeys system test improvements
4803.   [bug]		Backport parts of RT #45293 and RT #46267, specifically
			the fix for RT #46055 and mkeys system test
			improvements. [RT #46430]
2017-10-31 06:06:07 +01:00
Mark Andrews
3e4480ae34 tmp should be a (struct in_addr) not (struct in_addr *)
(cherry picked from commit 6e02359034)
2017-10-31 10:35:52 +11:00
Tinderbox User
fb177937be update copyright notice / whitespace 2017-10-28 23:46:15 +00:00
Michał Kępień
8daeae9b01 [v9_11] Improve clarity of keytable unit tests
4799.	[cleanup]	Improve clarity of keytable unit tests. [RT #46407]

(cherry picked from commit c6c1193e39)
2017-10-28 20:03:07 +02:00
Mark Andrews
c5e68335a1 address resource leak [RT #46413]
(cherry picked from commit c341e524dc)
2017-10-27 10:01:38 +11:00
Evan Hunt
e7c0f97842 [v9_11] check file and tree headers when loading map files
4792.	[bug]		Fix map file header correctness check. [RT #38418]

(cherry picked from commit 5b69d3da83)
2017-10-25 21:37:21 -07:00
Evan Hunt
6acd7b903b [v9_11] clean up DNS_MESSAGETEXTFLAG comments
(cherry picked from commit 89d1777560)
2017-10-25 21:34:09 -07:00
Tinderbox User
66ebd200f5 update copyright notice / whitespace 2017-10-25 23:50:03 +00:00
Evan Hunt
7c442d7fe0 [v9_11] log when update-policy local gets a key match from a remote host
4788.	[cleanup]	When using "update-policy local", log a warning
			when an update matching the session key is received
			from a remote host. [RT #46213]

- this completes change #4762.
2017-10-25 00:59:17 -07:00
Michał Kępień
5e1ca7a326 [v9_11] Rename nsec3param_salt_totext() to dns_nsec3param_salttotext(), make it public, add unit tests
4786.	[cleanup]	Turn nsec3param_salt_totext() into a public function,
			dns_nsec3param_salttotext(), and add unit tests for it.
			[RT #46289]

(cherry picked from commit 910a01550a)
2017-10-25 09:50:33 +02:00
Michał Kępień
17441aca3d [v9_11] Remove REQUIRE preventing change 4592 from working
Change 4592 was supposed to replace a REQUIRE with a conditional return.
While the latter was added, the former was not removed.  Remove the
relevant REQUIRE to fix RT #43822 for good.

(cherry picked from commit a94d68ce43)
2017-10-24 21:14:22 +02:00
Evan Hunt
e5715e1fe1 [v9_11] update B.ROOT-SERVERS.NET 2017-10-24 09:17:21 -07:00
Mark Andrews
764e2f3413 4779. [bug] Expire NTA at the start of the second. Don't update
the expiry value if the record has already expired
                        after a successful check. [RT #46368]

(cherry picked from commit c9438ee2e0)
2017-10-24 09:55:33 +11:00
Mark Andrews
23b41e9117 #include <inttypes.h>
(cherry picked from commit 5ff48dca18)
2017-10-20 16:36:25 +11:00
Mark Andrews
50433a667c 4776. [bug] Improve portability of ht_test. [RT #46333]
(cherry picked from commit 66258ca349)
2017-10-20 16:06:07 +11:00
Tinderbox User
ff2d95be3d update copyright notice / whitespace 2017-10-19 23:46:54 +00:00
Mark Andrews
659b66eb54 s/REQUIRE/ISC_REQUIRE/; include <isc/assertions.h> if ISC_REQUIRE is used; include <isc/likely.h> if ISC_{UN}LIKELY is used
(cherry picked from commit 0fab171196)
2017-10-19 16:47:23 +11:00
Mark Andrews
3c12bec945 4775. [bug] Address Coverity warnings in ht_test.c and mem_test.c
[RT #46281]

(cherry picked from commit 583e355951)
2017-10-19 13:11:13 +11:00
Mark Andrews
f44202ab64 4774. [bug] <isc/util.h> was incorrectly included in several
header files. [RT #46311]

(cherry picked from commit fe79e2efbf)
2017-10-19 12:32:53 +11:00
Evan Hunt
56e30ebae6 [v9_11] require writable managed keys directory
4769.	[bug]		Enforce the requirement that the managed keys
			directory (specified by "managed-keys-directory",
			and defaulting to the working directory if not
			specified) must be writable. [RT #46077]
2017-10-17 21:26:41 -07:00
Tinderbox User
3d5ed84c6f update copyright notice / whitespace 2017-10-17 23:49:26 +00:00
Michał Kępień
ad9772c559 [v9_11] Doxygen fixes and cleanups
4773.	[doc]		Fixed generating Doxygen documentation for functions
			annotated using certain macros.  Miscellaneous
			Doxygen-related cleanups. [RT #46276]

(cherry picked from commit 2361003a88)
2017-10-17 06:58:05 +02:00
Tinderbox User
b22915c279 update copyright notice / whitespace 2017-10-11 23:46:26 +00:00
Mark Andrews
55ed351e81 reserve subscription flags
(cherry picked from commit a9a983781e)
2017-10-12 09:20:18 +11:00
Evan Hunt
5d7d67f82a [v9_11] ignore cache when sending 5011 refresh queries
4771.	[bug]		When sending RFC 5011 refresh queries, disregard
			cached DNSKEY rrsets. [RT #46251]

(cherry picked from commit b2597ce86b)
2017-10-11 14:24:52 -07:00
Evan Hunt
6216df5ccd [v9_11] reduce unnecessary priming queries
4770.	[bug]		Cache additional data from priming queries as glue.
			Previously they were ignored as unsigned
			non-answer data from a secure zone, and never
			actually got added to the cache, causing hints
			to be used frequently for root-server
			addresses, which triggered re-priming. [RT #45241]

(cherry picked from commit 5de02a075b)
2017-10-11 09:07:37 -07:00
Michał Kępień
527500acb0 [v9_11] Sync draft-durand-doa-over-dns snippet in lib/dns/tests/rdata_test.c with draft version -03 2017-10-09 10:53:02 +02:00
Mark Andrews
c85920c0b4 4766. [cleanup] Addresss Coverity warnings. [RT #46150]
(cherry picked from commit 5df3f839b2)
2017-10-09 18:37:46 +11:00
Evan Hunt
fde1f87306 [v9_11] add missing names 2017-10-06 17:38:51 -07:00
Tinderbox User
8a99b24dbe update copyright notice / whitespace 2017-10-06 23:46:41 +00:00
Evan Hunt
f592d2f76c [v9_11] further restrict update-policy local
4762.	[func]		"update-policy local" is now restricted to updates
                from local addresses. (Previously, other addresses
                were allowed so long as updates were signed by the
                local session key.) [RT #45492]
2017-10-06 15:43:18 -07:00
Michał Kępień
4ee1fbe056 [v9_11] Add support for DOA
4761.	[protocol]	Add support for DOA. [RT #45612]

(cherry picked from commit 417218837e)
2017-10-06 12:56:41 +02:00
Mark Andrews
bd35150bc6 add dns_name_istat to libdns.def.in 2017-10-06 14:23:47 +11:00
Mark Andrews
1c8aa38b53 4759. [func] Add logging channel "trust-anchor-telementry" to
record trust-anchor-telementry in incoming requests.
                            Both _ta-XXXX.<anchor>/NULL and EDNS KEY-TAG options
                            are logged.  [RT #46124]

    (cherry picked from commit b41c1aacbc)
2017-10-06 13:53:50 +11:00
Tinderbox User
649482995b update copyright notice / whitespace 2017-10-05 23:46:27 +00:00
Mark Andrews
2732d4922c 4754. [bug] dns_zone_setview needs a two stage commit to properly
handle errors. [RT #45841]
2017-10-05 13:41:49 +11:00
Mark Andrews
2e10e64586 cast to unsigned int
(cherry picked from commit 34efd9ad93)
2017-10-05 13:34:24 +11:00
Tinderbox User
aaec997e6c update copyright notice / whitespace 2017-10-04 23:46:25 +00:00
Mark Andrews
863cec26ca silence compiler warning 2017-10-04 18:08:10 +11:00
Mark Andrews
9678018943 #undef inet_ntop
(cherry picked from commit 396125eefe)
2017-10-04 17:50:22 +11:00
Mark Andrews
21d58795b1 4752. [test] Add unit test for isc_net_pton. [RT #46171]
(cherry picked from commit 5fcdb09126)
2017-10-04 14:11:42 +11:00
Evan Hunt
34971c7618 [v9_11] missing declaration of INSIST 2017-10-03 20:03:19 -07:00
Tinderbox User
a134177ed9 update copyright notice / whitespace 2017-10-03 23:46:31 +00:00
Evan Hunt
d5bd8bb71a [v9_11] de-DLV
4749.	[func]		The ISC DLV service has been shut down, and all
			DLV records have been removed from dlv.isc.org.
			- Removed references to ISC DLV in documentation
			- Removed DLV key from bind.keys
			- No longer use ISC DLV by default in delv
			[RT #46155]
2017-10-03 00:43:19 -07:00
Mark Andrews
ad1317338a 4748. [cleanup] Sprintf to snprintf coversions. [RT #46132]
(cherry picked from commit a009d03a1a)
2017-10-03 14:55:33 +11:00
Tinderbox User
0bf752f483 update copyright notice / whitespace 2017-09-27 23:46:52 +00:00
Mark Andrews
07aa165627 switch to using snprintf from sprintf
(cherry picked from commit d386eb54c6)
2017-09-28 07:16:20 +10:00
Mukund Sivaraman
a8fa3e2d44 Make isc_refcount_current() atomically read the counter value (#46074)
(cherry picked from commit abb8813a33)
2017-09-27 15:09:42 +05:30
Mukund Sivaraman
d0d2ba9546 Use stdatomic.h in acache code (#46085)
Part of change 4728.
2017-09-27 14:58:05 +05:30
Mark Andrews
d4eaef0b87 use %u and cast to unsigned int
(cherry picked from commit 2495de04a5)
2017-09-27 17:57:22 +10:00
Mark Andrews
d71d41341d 4740. [cleanup] Avoid triggering format-truncated warnings. [RT #46107] 2017-09-27 16:20:00 +10:00
Mark Andrews
62cce53589 tcp test got reversed
(cherry picked from commit b4c31c8795)
2017-09-27 15:20:16 +10:00
Mark Andrews
d72952cf25 4739. [cleanup] Address clang static analysis warnings. [RT #45952]
(cherry picked from commit f9f3f20d2d)
2017-09-27 10:58:44 +10:00
Evan Hunt
68d7ff133c [v9_11] backport rpz tweaks
4713.	[cleanup]	Minor revisions to RPZ code to reduce
			differences with the development branch. [RT #46037]
2017-09-26 11:02:59 -07:00
Mark Andrews
6b183c64a3 4737. [cleanup] Address Coverity warnings. [RT #46012]
(cherry picked from commit 08151d7fce)
2017-09-26 23:24:37 +10:00
Michał Kępień
5a8f2f0cd6 [v9_11] Comment NSEC3-related code and fix a few minor issues
4736.	[cleanup]	(a) Added comments to NSEC3-related functions in
			lib/dns/zone.c.  (b) Refactored NSEC3 salt formatting
			code.  (c) Minor tweaks to lock and result handling.
			[RT #46053]

(cherry picked from commit acc3728c47)
2017-09-26 11:28:38 +02:00
Mukund Sivaraman
dc0d95a23d Use stdint.h only when stdatomic.h is in use (stdint.h isn't available everywhere)
(cherry picked from commit fb9712f639)
2017-09-22 15:15:34 +05:30
Mark Andrews
7f8ccd62f2 #include <isc/string.h> as it includes both <string.h> and <strings.h> if they both exist
(cherry picked from commit 6138c5a5e4)
2017-09-22 18:09:50 +10:00
Tinderbox User
c05cfdba6a update copyright notice / whitespace 2017-09-21 23:50:32 +00:00
Mark Andrews
07b1de86e1 alphabetise 2017-09-21 18:06:34 +10:00
Tinderbox User
731c2e5f0f regen v9_11 2017-09-21 07:30:52 +00:00
Mark Andrews
d037e4dbbe #include <stdint.h> 2017-09-21 14:20:53 +10:00
Tinderbox User
28a3d74227 regen v9_11 2017-09-21 03:48:24 +00:00
Mark Andrews
c0d6d4e2f2 atomic_compare_exchange_strong_explicit's second argument should not be atomic_* 2017-09-21 13:41:43 +10:00
Mark Andrews
e24ec1cb12 explicitly list test programs 2017-09-21 13:06:26 +10:00
Tinderbox User
8688e7005a update copyright notice / whitespace 2017-09-19 23:47:50 +00:00
Mukund Sivaraman
027a4a5b5d Fix out of bounds access in DHCID totext() method (#46001)
(cherry picked from commit 98998f3ddd)
2017-09-19 19:34:13 +05:30
Mukund Sivaraman
b5252fcde5 Don't use memset() to wipe memory (#45947)
(cherry picked from commit d5707676e4)
2017-09-19 17:00:37 +05:30
Mukund Sivaraman
9905606390 Use C11's stdatomic.h instead of isc_atomic where available
(cherry picked from commit 404c9b1c53)
2017-09-19 15:49:21 +05:30
Tinderbox User
acce4b333d update copyright notice / whitespace 2017-09-18 23:52:43 +00:00
Michał Kępień
62f2fefaec [v9_11] Prevent possible infinite signing loop after retransferring an inline-signed slave using NSEC3
4727.	[bug]		Retransferring an inline-signed slave using NSEC3
			around the time its NSEC3 salt was changed could result
			in an infinite signing loop. [RT #45080]

(cherry picked from commit f665c724e4)
2017-09-18 09:23:18 +02:00
Michał Kępień
b351a58647 [v9_11] Improve handling of TCP_FASTOPEN on FreeBSD
4726.	[port]		Prevent setsockopt() errors related to TCP_FASTOPEN
			from being logged on FreeBSD if the kernel does not
			support it.  Notify the user when the kernel does
			support TCP_FASTOPEN, but it is disabled by sysctl.
			Add a new configure option, --disable-tcp-fastopen, to
			disable use of TCP_FASTOPEN altogether. [RT #44754]

(cherry picked from commit c2179857de)
2017-09-18 08:34:53 +02:00
Mark Andrews
2832654236 don't use strlcat with non NUL terminated strings rt45981_stage3
(cherry picked from commit dc71aa898a)
2017-09-15 13:14:40 +10:00
Tinderbox User
7c38d4781f update copyright notice / whitespace 2017-09-14 23:48:31 +00:00
Mark Andrews
2b5e8ac281 silence warning
(cherry picked from commit c59bf663e8)
2017-09-14 19:02:45 +10:00
Mark Andrews
cd320a8d23 #include <isc/string.h>
(cherry picked from commit 7eb73f6288)
2017-09-14 18:58:52 +10:00
Mark Andrews
4f851656c4 #include <isc/string.h>
(cherry picked from commit 5fb0c09a5e)
2017-09-14 18:55:15 +10:00
Mark Andrews
5a93d3be4e more str{n}{cat,cpy} corrections rt45981_stage2
(cherry picked from commit cb629cdeda)
2017-09-14 18:33:02 +10:00
Evan Hunt
41621724af [v9_11] cast char * 2017-09-13 22:04:08 -07:00
Evan Hunt
4c2dd50d64 [v9_11] clean up bufsize errors
(cherry picked from commit 9b729a06b0)
2017-09-13 21:19:11 -07:00
Tinderbox User
bd911976d5 update copyright notice / whitespace 2017-09-13 23:52:25 +00:00
Evan Hunt
7df17e0de2 [v9_11] fix incorrect comment 2017-09-13 13:53:57 -07:00
Mukund Sivaraman
d45eddf28f Fix output string size in GOST unittest
(cherry picked from commit e5eca6eebb)
2017-09-14 01:36:37 +05:30
Mukund Sivaraman
e004f87b71 Fix gost unittest failure
(cherry picked from commit 93f7384928)
2017-09-14 00:29:53 +05:30
Mark Andrews
28a55095f7 add #include <isc/string.h>
(cherry picked from commit 4c9ba9ded8)
2017-09-13 19:51:49 +05:30
Mukund Sivaraman
a13e9f894c Add missing <isc/print.h>
(cherry picked from commit 188fa6ea68)
2017-09-13 19:48:20 +05:30
Mukund Sivaraman
fc7ed600ae Tweak hash_test.c further, passing sizeof(str)
(cherry picked from commit 8997fc0a3f)
2017-09-13 19:32:57 +05:30
Mukund Sivaraman
4baac8b9f3 Tweak
(cherry picked from commit a2873eabf6)
2017-09-13 19:32:56 +05:30
Mukund Sivaraman
3dc00443bb Fix size of output string in hash tests
(cherry picked from commit bc5e0a6868)
2017-09-13 19:32:54 +05:30
Evan Hunt
7cd594b842 [master] cleanup strcat/strcpy
4722.	[cleanup]	Clean up uses of strcpy() and strcat() in favor of
			strlcpy() and strlcat() for safety. [RT #45981]

(cherry picked from commit 114f95089c)
2017-09-13 00:17:16 -07:00
Mark Andrews
c76e8412f4 4719. [bug] Address PVS static analyzer warnings. [RT #45946]
(cherry picked from commit 34130ee25a)
2017-09-13 09:51:39 +10:00
Tinderbox User
c40e033d21 update copyright notice / whitespace 2017-09-12 23:47:30 +00:00
Evan Hunt
a2a0100e0f [v9_11] improve handling of qcount=0 replies
4717.	[bug]		Treat replies with QCOUNT=0 as truncated if TC=1,
			FORMERR if TC=0, and log the error correctly.
			[RT #45836]

(cherry picked from commit 25b33bede4)
2017-09-12 15:27:06 -07:00
Mark Andrews
1feffc6fdb 4715. [bug] TreeMemMax was mis-identified as a second HeapMemMax
in the Json cache statistics. [RT #45980]

(cherry picked from commit 0a1359034d)
2017-09-12 14:55:40 +10:00
Mark Andrews
22bed621ef 4714. [port] openbsd/libressl: add support for building with
--enable-openssl-hash. [RT #45982]

(cherry picked from commit c75e9c7630)
2017-09-12 14:20:13 +10:00
Evan Hunt
29f0ced781 [v9_11] add missing rrtypes to genzones
4711.	[test]		Some RR types were missing from genzones.sh.
			[RT #45782]

(cherry picked from commit 3e66721b35)
2017-09-11 09:35:03 -07:00
Evan Hunt
b9fd54f8d4 [v9_11] change hash function for RRL
4709.	[cleanup]	Use dns_name_fullhash() to hash names for RRL.
			[RT #45435]

(cherry picked from commit f13385770e)
2017-09-08 15:46:55 -07:00
Mukund Sivaraman
836601ccc5 Tweak code (reviewed by Mark)
(cherry picked from commit cdabd36dc7)
2017-09-01 12:42:12 +05:30
Mark Andrews
b301c4293c 4697. [bug] Restore workaround for Microsoft Windows TSIG hash
computation bug. [RT #45854]

(cherry picked from commit a8a20462b5)
2017-09-01 11:23:40 +10:00