Improve connection handling when talking to TCP upsteam servers.

Specifically, be prepared to open a new connection when we
want to make multiple queries but the upstream server accepts
fewer queries per connection.
This commit is contained in:
Simon Kelley
2017-02-10 21:12:30 +00:00
parent 68f6312d4b
commit 361dfe5158
3 changed files with 111 additions and 88 deletions

View File

@@ -485,6 +485,7 @@ union mysockaddr {
#define SERV_FROM_FILE 4096 /* read from --servers-file */
#define SERV_LOOP 8192 /* server causes forwarding loop */
#define SERV_DO_DNSSEC 16384 /* Validate DNSSEC when using this server */
#define SERV_GOT_TCP 32768 /* Got some data from the TCP connection */
struct serverfd {
int fd;