Commit graph

186 commits

Author SHA1 Message Date
Michal Nowak
a584a8f88f
Update clang to version 14
(cherry picked from commit 1c45a9885a)
2022-06-16 18:11:03 +02:00
Aram Sargsyan
1f2d2611ee Fix dig +nssearch race between recv_done() and send_done()
The `send_done()` callback needs to access query's `link.next` pointer
when running in `+nssearch` mode, even if the query is already canceled
or serviced, which can happen when `recv_done()` happens to be called
earlier than `send_done()`.

Keep the next query's pointer before unlinking the query from the
lookup's queries list in `clear_query()` so that `send_done()` can
use it even if the query is cleared.
2022-04-29 09:09:39 +00:00
Ondřej Surý
2bf7921c7e Update the copyright information in all files in the repository
This commit converts the license handling to adhere to the REUSE
specification.  It specifically:

1. Adds used licnses to LICENSES/ directory

2. Add "isc" template for adding the copyright boilerplate

3. Changes all source files to include copyright and SPDX license
   header, this includes all the C sources, documentation, zone files,
   configuration files.  There are notes in the doc/dev/copyrights file
   on how to add correct headers to the new files.

4. Handle the rest that can't be modified via .reuse/dep5 file.  The
   binary (or otherwise unmodifiable) files could have license places
   next to them in <foo>.license file, but this would lead to cluttered
   repository and most of the files handled in the .reuse/dep5 file are
   system test files.

(cherry picked from commit 58bd26b6cf)
2022-01-11 12:22:09 +01:00
Ondřej Surý
093cd31ae2 Update the source code formatting using clang-format-13
clang-format-13 fixed some of the formatting that clang-format-12 got
wrong.  Update the formatting.

(cherry picked from commit ed95f9fba3)
2021-10-12 11:31:55 +02:00
Evan Hunt
df698d73f4 update all copyright headers to eliminate the typo 2020-09-14 16:50:58 -07:00
Mark Andrews
0dc04cb901 dig +bufsize=0 failed to disable EDNS as a side effect. 2020-09-02 09:07:55 +00:00
Ondřej Surý
829b461c54 Merge branch '46-enforce-clang-format-rules' into 'master'
Start enforcing the clang-format rules on changed files

Closes #46

See merge request isc-projects/bind9!3063

(cherry picked from commit a04cdde45d)

d2b5853b Start enforcing the clang-format rules on changed files
618947c6 Switch AlwaysBreakAfterReturnType from TopLevelDefinitions to All
654927c8 Add separate .clang-format files for headers
5777c44a Reformat using the new rules
60d29f69 Don't enforce copyrights on .clang-format
2020-02-14 08:45:59 +00:00
Ondřej Surý
cdef20bb66 Merge branch 'each-style-tweak' into 'master'
adjust clang-format options to get closer to ISC style

See merge request isc-projects/bind9!3061

(cherry picked from commit d3b49b6675)

0255a974 revise .clang-format and add a C formatting script in util
e851ed0b apply the modified style
2020-02-14 05:35:29 +00:00
Ondřej Surý
2e55baddd8 Merge branch '46-add-curly-braces' into 'master'
Add curly braces using uncrustify and then reformat with clang-format back

Closes #46

See merge request isc-projects/bind9!3057

(cherry picked from commit 67b68e06ad)

36c6105e Use coccinelle to add braces to nested single line statement
d14bb713 Add copy of run-clang-tidy that can fixup the filepaths
056e133c Use clang-tidy to add curly braces around one-line statements
2020-02-13 21:28:35 +00:00
Ondřej Surý
c931d8e417 Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master'
Reformat source code with clang-format

Closes #46

See merge request isc-projects/bind9!2156

(cherry picked from commit 7099e79a9b)

4c3b063e Import Linux kernel .clang-format with small modifications
f50b1e06 Use clang-format to reformat the source files
11341c76 Update the definition files for Windows
df6c1f76 Remove tkey_test (which is no-op anyway)
2020-02-12 14:51:18 +00:00
Mark Andrews
4906fe975c Don't print ';;' comments in yaml mode. 2019-09-06 14:14:20 +10:00
Evan Hunt
3ef91562f1 add a toy name server that replies from the wrong address 2019-09-03 10:14:15 -03:00
Diego dos Santos Fronza
460d4d63ee Added +unexpected option so dig will print replies from unexpected
sources.
2019-09-03 10:14:15 -03:00
Ondřej Surý
f1a887a0b9 dighost_error declaration in dig/dig.h was missing extern 2019-08-29 11:24:16 +02:00
Evan Hunt
71325852f1 add "dig +yaml" output format 2019-08-25 16:41:14 -07:00
Mark Andrews
d8798098e8 support printing AAAA in expanded form 2019-05-06 21:50:38 -07:00
Witold Krecicki
e9bf8e4798 Add some DBC checks in dighost; fix race between clear_query and send_done in dighost 2018-11-07 13:04:13 -05:00
Tony Finch
3064d3d0ef Abolish ip6.int support in dig and mdig 2018-11-05 19:07:31 -05:00
Witold Kręcicki
428daba5ce Do not use vector socket functions in diagnostic tools
Refactor diagnostic tools code to no longer use:

  - isc_socket_recvv()
  - isc_socket_sendtov2()
  - isc_socket_sendv()

as these functions will be removed shortly.
2018-10-31 12:12:53 +01: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
Evan Hunt
0cc7aa250e change "key" to "tsigkey" to silence "short global name" warning 2018-04-20 19:51:00 -04:00
Mark Andrews
58c103e09c dig: add the ability to set RA and TC in queries 2018-04-20 14:17:58 -07:00
Ondřej Surý
921d05ddcf Replace usage of strsep with POSIX strtok_r() 2018-04-12 10:37:33 +02:00
Ondřej Surý
00043bfa18 Remove idnkit-1 support from dig 2018-03-17 13:41:59 +00:00
Petr Menšík
94757c1545 Remove conversion from locale to utf8 from public API
Emit fatal failures on locale to ACE encoding

Separate idnout support, disable it for libidn2 < 2.0

Add custom path to libidn. Leave default path for multilib support.

Allow turning off IDN input processing by dig option

Improve documentation, fix support in host

Fix configure changes to adjust help text

Use strlcpy with size guard

Improve IDN variants choosing. Fix idn2 function name.

Remove immediate idn_locale_to_ace and idn_ace_to_locale.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
2018-03-17 13:13:47 +00: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
Tinderbox User
72326f7701 update copyright notice / whitespace 2018-02-18 23:47:45 +00:00
Mark Andrews
b060852a7c signed vs unsigned fixes 2018-02-16 10:19:57 +11:00
Ray Bellis
8993ecd06a 4824. [port] Add iOS hooks to dig. [RT #42011] 2017-11-23 16:58:12 +11:00
Michał Kępień
14afc8425b [master] Prevent dig INSIST failures and hangs in some failure modes
4756.	[bug]		Interrupting dig could lead to an INSIST failure after
			certain errors were encountered while querying a host
			whose name resolved to more than one address.  Change
			4537 increased the odds of triggering this issue by
			causing dig to hang indefinitely when certain error
			paths were evaluated.  dig now also retries TCP queries
			(once) if the server gracefully closes the connection
			before sending a response. [RT #42832, #45159]
2017-10-05 09:42:31 +02:00
Evan Hunt
b2bf8de2a3 [master] split up main and add callback function pointers to support iOS
4677.	[port]		Split up the main function in dig to better support
			the iOS app version. [RT #45508]
2017-08-10 22:51:24 -07:00
Evan Hunt
c4cfb0b4dc [master] remove dig +sigchase
4674.   [func]          "dig +sigchase", and related options "+topdown" and
                        "+trusted-keys", have been removed. Use "delv" for
                        queries with DNSSEC validation. [RT #42793]
2017-08-09 11:03:27 -07:00
Mark Andrews
4bf32aa587 4654. [cleanup] Don't use C++ keywords delete, new and namespace.
[RT #45538]
2017-07-21 11:52:24 +10:00
Tinderbox User
f557aeef7c update copyright notice / whitespace 2017-01-05 23:45:24 +00:00
Evan Hunt
5804332588 [master] EDNS padding and keepalive support
4549.	[func]		Added support for the EDNS TCP Keepalive option
			(RFC 7828). [RT #42126]

4548.	[func]		Added support for the EDNS Padding option (RFC 7830).
			[RT #42094]
2017-01-04 09:16:30 -08:00
Mark Andrews
52e2aab392 4546. [func] Extend the use of const declarations. [RT #43379] 2016-12-30 15:45:08 +11:00
Mark Andrews
6089c8df71 4537. [bug] Handle timouts better in dig/host/nslookup. [RT #43576] 2016-12-14 15:42:43 +11:00
Mark Andrews
42470b0b87 4496. [func] dig: add +idnout to control whether labels are
display in punycode or not.  Requires idn support
                        to be enabled at compile time. [RT #43398]
2016-10-28 12:05:19 +11:00
Mark Andrews
3b6aba8dcb 4481. [func] dig: make +class, +crypto, +multiline, +rrcomments,
+onesoa, +qr, +ttlid, +ttlunits and -u per lookup
                        rather than global. [RT #42450]
2016-10-10 11:55:59 +11:00
Mark Andrews
0c27b3fe77 4401. [misc] Change LICENSE to MPL 2.0. 2016-06-27 14:56:38 +10:00
Mark Andrews
b91d11bfcc copyrights / whitespace 2016-02-11 10:44:21 +11:00
Mukund Sivaraman
79a55d4f4d Add option to tools to print RRs in unknown presentation format (#41595) 2016-02-09 15:39:02 +05:30
Mark Andrews
49762dffc4 4282. [func] 'dig +[no]mapped' determine whether the use of mapped
IPv4 addresses over IPv6 is permitted or not.  The
                        default is +mapped.  [RT #41307]
2015-12-19 09:47:11 +11:00
Mark Andrews
b8a04d50a3 Change 3813 broke dig/host -4/-6. No CHANGES as this is has not been released 2015-08-12 12:50:15 +10:00
Mark Andrews
ce67023ae3 4152. [func] Implement DNS COOKIE option. This replaces the
experimental SIT option of BIND 9.10.  The following
                        named.conf directives are avaliable: send-cookie,
                        cookie-secret, cookie-algorithm and nocookie-udp-size.
                        The following dig options are available:
                        +[no]cookie[=value] and +[no]badcookie.  [RT #39928]
2015-07-06 09:44:24 +10:00
Mark Andrews
c7463967db 4119. [func] Allow dig to set the message opcode. [RT #39550] 2015-05-19 12:46:06 +10:00
Francis Dupont
bcb68be0a8 misc fixes for VS 2015 CTP #39267 2015-04-17 02:57:02 +02:00
Tinderbox User
c110d61b17 update copyright notice / whitespace 2015-01-20 23:45:26 +00:00
Evan Hunt
11463c0ac2 [master] clean up gcc -Wshadow warnings
4039.	[cleanup]	Cleaned up warnings from gcc -Wshadow. [RT #37381]
2015-01-20 13:29:18 -08:00