evdns: Add support for DNS requests via TCP#1004
Conversation
|
Some comments about the pull request. Fallback to TCP in case of truncated DNS requests is done automatically. To imitate the old behaviour macros Support for TCP connections in DNS server is done primarly for tests. I wasn't sure how better to implement it (in terms of API). At the moment the same function |
|
Many thanks for this patch set! |
|
Refs: #684 |
azat
left a comment
There was a problem hiding this comment.
Broadly looks good, but some comments need to be addressed first
azat
left a comment
There was a problem hiding this comment.
Ok, can you rebase against upstream/master and squash fixup comments? Also maybe I will something else while looking before merging, objections on rebasing? (will push --force into this topic branch, to update the PR HEAD, so that it will be marked as merged)
|
Hi! I've squashed all changes to one commit, rebased on master and forced pushed. |
|
Applied, many thanks! (I fixed some small issues, you can take a look at the topic branch that contains it, and also I added the description of the PR to the topic branch merge commit) |
|
Hi! Thanks for your help and support. |
Added support for DNS requests via TCP. By default, requests are
done via UDP. In case truncated response is received new attempt
is done via TCP connection. Added 2 new macros DNS_QUERY_USEVC and
DNS_QUERY_IGNTC to force all requests to be done via TCP and to
disable switch to TCP in case of truncated responses.
Also added possibility for DNS server to listen and receive requests
on TCP port. Current implementation of TCP support in DNS server seems
rather preliminary and maybe changes after discussion and code review.
Fixes: #979