Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist: Only declare/set freshConn if MSG_FASTOPEN is defined #5449

Merged
merged 1 commit into from Jun 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions pdns/dnsdist-tcp.cc
Expand Up @@ -448,14 +448,18 @@ void* tcpClientThread(int pipefd)

int dsock = -1;
uint16_t downstreamFailures=0;
#ifdef MSG_FASTOPEN
bool freshConn = true;
#endif /* MSG_FASTOPEN */
if(sockets.count(ds->remote) == 0) {
dsock=setupTCPDownstream(ds, downstreamFailures);
sockets[ds->remote]=dsock;
}
else {
dsock=sockets[ds->remote];
#ifdef MSG_FASTOPEN
freshConn = false;
#endif /* MSG_FASTOPEN */
}

ds->queries++;
Expand Down Expand Up @@ -493,7 +497,9 @@ void* tcpClientThread(int pipefd)
downstreamFailures++;
dsock=setupTCPDownstream(ds, downstreamFailures);
sockets[ds->remote]=dsock;
#ifdef MSG_FASTOPEN
freshConn=true;
#endif /* MSG_FASTOPEN */
goto retry;
}

Expand All @@ -513,7 +519,9 @@ void* tcpClientThread(int pipefd)
downstreamFailures++;
dsock=setupTCPDownstream(ds, downstreamFailures);
sockets[ds->remote]=dsock;
#ifdef MSG_FASTOPEN
freshConn=true;
#endif /* MSG_FASTOPEN */
if(xfrStarted) {
goto drop;
}
Expand Down