netty5/codec-dns/src/main/java/io/netty/handler/codec/dns
Norman Maurer 1672b6d12c
Add support for TCP fallback when we receive a truncated DnsResponse (#9139)
Motivation:

Sometimes DNS responses can be very large which mean they will not fit in a UDP packet. When this is happening the DNS server will set the TC flag (truncated flag) to tell the resolver that the response was truncated. When a truncated response was received we should allow to retry via TCP and use the received response (if possible) as a replacement for the truncated one.

See https://tools.ietf.org/html/rfc7766.

Modifications:

- Add support for TCP fallback by allow to specify a socketChannelFactory / socketChannelType on the DnsNameResolverBuilder. If this is set to something different then null we will try to fallback to TCP.
- Add decoder / encoder for TCP
- Add unit tests

Result:

Support for TCP fallback as defined by https://tools.ietf.org/html/rfc7766 when using DnsNameResolver.
2019-05-17 14:37:11 +02:00
..
AbstractDnsMessage.java Fix false-positives when using ResourceLeakDetector. 2016-12-04 09:01:39 +01:00
AbstractDnsOptPseudoRrRecord.java Add support for Client Subnet in DNS Queries (RFC7871) 2016-09-06 07:16:57 +02:00
AbstractDnsRecord.java use checkPositive/checkPositiveOrZero (#8835) 2019-02-04 16:01:49 +01:00
DatagramDnsQuery.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DatagramDnsQueryDecoder.java Clean-up unused imports 2016-09-30 09:08:50 +02:00
DatagramDnsQueryEncoder.java Add support for TCP fallback when we receive a truncated DnsResponse (#9139) 2019-05-17 14:37:11 +02:00
DatagramDnsResponse.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DatagramDnsResponseDecoder.java Add support for TCP fallback when we receive a truncated DnsResponse (#9139) 2019-05-17 14:37:11 +02:00
DatagramDnsResponseEncoder.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DefaultDnsOptEcsRecord.java Add support for Client Subnet in DNS Queries (RFC7871) 2016-09-06 07:16:57 +02:00
DefaultDnsPtrRecord.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DefaultDnsQuery.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DefaultDnsQuestion.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DefaultDnsRawRecord.java Make retained derived buffers recyclable 2016-05-17 11:16:13 +02:00
DefaultDnsRecordDecoder.java DefaultDnsRecordDecoder compression and index decode bug 2016-10-20 09:00:55 -07:00
DefaultDnsRecordEncoder.java EDNS Client Subnet is not encoded correctly when source prefix length is not a multiple of 8. 2017-12-01 08:14:13 +01:00
DefaultDnsResponse.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DnsMessage.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DnsMessageUtil.java Fix type inference w/ JDK8 2016-03-23 18:06:38 +01:00
DnsOpCode.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DnsOptEcsRecord.java fix the typos 2017-04-20 04:56:09 +02:00
DnsOptPseudoRecord.java Add support for Client Subnet in DNS Queries (RFC7871) 2016-09-06 07:16:57 +02:00
DnsPtrRecord.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DnsQuery.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DnsQueryEncoder.java Add support for TCP fallback when we receive a truncated DnsResponse (#9139) 2019-05-17 14:37:11 +02:00
DnsQuestion.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DnsRawRecord.java Make retained derived buffers recyclable 2016-05-17 11:16:13 +02:00
DnsRecord.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DnsRecordDecoder.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DnsRecordEncoder.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DnsRecordType.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DnsResponse.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DnsResponseCode.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
DnsResponseDecoder.java Add support for TCP fallback when we receive a truncated DnsResponse (#9139) 2019-05-17 14:37:11 +02:00
DnsSection.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
package-info.java [#5088] Add annotation which marks packages/interfaces/classes as unstable 2016-05-09 15:16:35 +02:00
TcpDnsQueryEncoder.java Add support for TCP fallback when we receive a truncated DnsResponse (#9139) 2019-05-17 14:37:11 +02:00
TcpDnsResponseDecoder.java Add support for TCP fallback when we receive a truncated DnsResponse (#9139) 2019-05-17 14:37:11 +02:00