Default to only switch to TCP if response was truncated
Currently, if queries to name servers over UDP result in either a truncated response, or any kind of error, the query will be retried over TCP. It should be possible to only use TCP for the case of oversized messages, and avoid it in the common case. This change makes this the default behavior and adds an option to ResolverOpts that can be enabled to get the current behavior.
This commit is contained in:

committed by
Benjamin Fry

parent
cb73fd9cc9
commit
aefb6deded
@@ -598,6 +598,7 @@ pub mod testing {
|
||||
ResolverConfig::default(),
|
||||
ResolverOpts {
|
||||
validate: true,
|
||||
try_tcp_on_error: true,
|
||||
..ResolverOpts::default()
|
||||
},
|
||||
handle,
|
||||
|
Reference in New Issue
Block a user