Commit Graph
1060 Commits
Author SHA1 Message Date
Michał KępieńandOndřej Surý 4df4a8e731 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.
2018-04-09 12:14:16 +02:00
Witold Kręcicki 702c022016 libdns refactoring: get rid of multiple versions of dns_xfrin_create, dst_key_generate, dst_lib_init and dst_context_create 2018-04-06 08:04:41 +02:00
Witold Kręcicki e2a06db7f3 libdns refactoring: get rid of multiple versions of dns_master_loadfile, dns_master_loadfileinc, dns_master_dump, dns_master_dumpinc, dns_master_dumptostream, dns_master_stylecreate 2018-04-06 08:04:41 +02:00
Witold Kręcicki d76ed0da1c libdns refactoring: get rid of two versions of dns_byaddr_createptrname 2018-04-06 08:04:41 +02:00
Ondřej Surý 08f66d8509 Don't use the IDN traslated name if no conversion took a place 2018-03-21 14:05:00 +00:00
Ondřej Surý 00043bfa18 Remove idnkit-1 support from dig 2018-03-17 13:41:59 +00:00
Ondřej Surý 76c05a71fc Simplify the libidn2 configure checks 2018-03-17 13:13:47 +00:00
Petr MenšíkandOndřej Surý 29b94bbb04 Sanitize IDN initialization
Signed-off-by: Petr Menšík <pemensik@redhat.com>
2018-03-17 13:13:47 +00:00
Petr MenšíkandOndřej Surý 8254cf69d3 Remove support for libidn (IDN 2003)
Signed-off-by: Petr Menšík <pemensik@redhat.com>
2018-03-17 13:13:47 +00:00
Petr MenšíkandOndřej Surý 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
Tomas HozzaandOndřej Surý 505f673451 Add support for libidn2
Added two new configure options:
--with-libidn2 - to enable IDN using GNU libidn2

idnkit, libidn and libidn2 support can not be used at the same time.

NOTE: libidn2 does not support punycode back to Unicode
characters, so support for this is missing.

Signed-off-by: Tomas Hozza <thozza@redhat.com>

Removed iconv, convert directly from locale to ACE

Fix libidn2 and idnkit origin appending

Make IDN options in help less different

Signed-off-by: Petr Menšík <pemensik@redhat.com>
2018-03-17 13:13:47 +00:00
Tomas HozzaandOndřej Surý 2320443f63 Add support for GNU libidn
Added new configure option:
--with-libidn - to enable IDN using GNU libidn

Renamed configure option:
--with-idn to --with-idnkit to make the option usage more clear

idnkit and libidn support can not be used at the same time.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2018-03-17 13:13:47 +00:00
Evan Hunt 7d29f7e94b CHANGES, doc 2018-02-24 11:02:03 -08:00
Evan Hunt 05a91e4e4c list servers that time out in dig +nssearch 2018-02-24 10:56:09 -08: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 67eea245f5 reorder test to silence cppcheck 2018-02-16 10:20:39 +11:00
Mark Andrews b060852a7c signed vs unsigned fixes 2018-02-16 10:19:57 +11:00
Tinderbox User 74651f35ef regen master 2018-02-10 01:12:12 +00:00
Tinderbox User 02ce048c91 update copyright notice / whitespace 2018-02-08 23:46:17 +00:00
Tony FinchandMukund Sivaraman cc82b5aa3c Document dig -u in manpage (#47150) 2018-02-09 00:50:51 +05:30
Mark Andrews 940449fc72 4845. [bug] Dig (non iOS) should exit on malformed names.
[RT #46806]
2017-12-12 13:43:55 +11:00
Ray Bellis d92d70ac5d fix warning under Xcode for iOS 2017-11-27 10:16:55 +00:00
Ray BellisandMark Andrews 8993ecd06a 4824. [port] Add iOS hooks to dig. [RT #42011] 2017-11-23 16:58:12 +11:00
Mark Andrews e2f9dcfd86 more DNS_NAME_INITABSOLUTE cases 2017-11-14 00:21:50 +11:00
Mark Andrews 3def40b01b 4816. [bug] Don't use a common array for storing EDNS options
in DiG as it could fill up. [RT #45611]
2017-11-13 16:10:35 +11:00
Tinderbox User 0e29543a3d regen master 2017-11-07 21:42:32 +00:00
Evan Hunt 23b81977fe [master] minor doc fixes 2017-11-07 13:23:41 -08: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
Mark Andrews 055d310e54 add L for wide 2017-10-04 20:44:01 +11:00
Mark Andrews f9f3f20d2d 4739. [cleanup] Address clang static analysis warnings. [RT #45952] 2017-09-27 10:27:09 +10:00
Mark Andrews 744061a03b 4738. [port] win32: strftime mishandles %Z. [RT #46039] 2017-09-26 23:32:40 +10:00
Mark Andrews cb629cdeda more str{n}{cat,cpy} corrections rt45981_stage2 2017-09-14 18:11:56 +10:00
Evan Hunt 114f95089c [master] cleanup strcat/strcpy
4722.	[cleanup]	Clean up uses of strcpy() and strcat() in favor of
			strlcpy() and strlcat() for safety. [RT #45981]
2017-09-13 00:14:37 -07:00
Mark Andrews abda73147d fix first if test in setoption 2017-09-13 11:57:00 +10:00
Mark Andrews 34130ee25a 4719. [bug] Address PVS static analyzer warnings. [RT #45946] 2017-09-13 09:50:51 +10:00
Evan Hunt b103b0c011 [master] remap getaddrinfo() to irs_getgetaddrinfo()
The libirs version of getaddrinfo() cannot be called from within BIND9.
2017-09-11 15:03:57 -07:00
Evan Hunt 8e014c45ae [master] dig: retain domain when retrying with tcp
4712.	[bug]		"dig +domain" and "dig +search" didn't retain the
			search domain when retrying with TCP. [RT #45547]
2017-09-11 10:10:16 -07:00
Francis Dupont 90f6140832 Finished merge of rt45019 (openssl hash default) 2017-09-09 10:30:16 +02:00
Evan Hunt bcb7c7fdad [master] fix tag 2017-09-08 18:22:12 -07:00
Evan Hunt 8eb88aafee [master] add libns and remove liblwres
4708.   [cleanup]       Legacy Windows builds (i.e. for XP and earlier)
                        are no longer supported. [RT #45186]

4707.	[func]		The lightweight resolver daemon and library (lwresd
			and liblwres) have been removed. [RT #45186]

4706.	[func]		Code implementing name server query processing has
			been moved from bin/named to a new library "libns".
			Functions remaining in bin/named are now prefixed
			with "named_" rather than "ns_".  This will make it
			easier to write unit tests for name server code, or
			link name server functionality into new tools.
			[RT #45186]
2017-09-08 13:47:34 -07:00
Mark Andrews 164616cb9c don't attempt to link -lcrypto multiple times 2017-09-08 16:15:37 +10:00
Evan Hunt 509ba96497 [rt45019] separate DNS_CRYPTO_LIBS from ISC_OPENSSL_LIBS and use both 2017-09-07 22:05:20 -07:00
Tinderbox User a5d6b4c4c8 regen master 2017-08-30 01:12:14 +00:00
Michał Kępień d6814700de [master] Ensure consistent handling of -4/-6 command line options in all tools
4690.	[bug]		Command line options -4/-6 were handled inconsistently
			between tools. [RT #45632]
2017-08-29 10:19:38 +02:00
Mark Andrews 07741d43c8 4688. [protocol] Check and display EDNS KEY TAG options (RFC 8145) in
messages. [RT #44804]
2017-08-25 08:38:19 +10: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
Tinderbox User 20809d0a5a regen master 2017-08-10 01:11:49 +00: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
Evan Hunt cdacec1dcb [master] silence gcc 7 warnings
4673.	[port]		Silence GCC 7 warnings. [RT #45592]
2017-08-09 00:17:44 -07:00