RunningTCPQuestionGuard(RunningTCPQuestionGuard&&) = delete;
RunningTCPQuestionGuard& operator=(const RunningTCPQuestionGuard&) = default;
RunningTCPQuestionGuard& operator=(RunningTCPQuestionGuard&&) = delete;
- RunningTCPQuestionGuard(int fileDesc) : d_fd(fileDesc) {}
+ RunningTCPQuestionGuard(int fileDesc) :
+ d_fd(fileDesc) {}
~RunningTCPQuestionGuard()
{
if (d_fd != -1) {
/* note that if the proxy header used a 'LOCAL' command, the original source and destination are untouched so everything should be fine */
conn->d_mappedSource = conn->d_source;
if (t_proxyMapping) {
- if (const auto *iter = t_proxyMapping->lookup(conn->d_source)) {
+ if (const auto* iter = t_proxyMapping->lookup(conn->d_source)) {
conn->d_mappedSource = iter->second.address;
++iter->second.stats.netmaskMatches;
}
all queries sent over this connection */
comboWriter->d_proxyProtocolValues = conn->proxyProtocolValues;
- struct timeval start{};
+ struct timeval start
+ {
+ };
Utility::gettimeofday(&start, nullptr);
DNSName qname;
bool hadError = sendResponseOverTCP(comboWriter, response);
finishTCPReply(comboWriter, hadError, false);
- struct timeval now{};
+ struct timeval now
+ {
+ };
Utility::gettimeofday(&now, nullptr);
uint64_t spentUsec = uSec(now - start);
t_Counters.at(rec::Histogram::cumulativeAnswers)(spentUsec);
bool fromProxyProtocolSource = expectProxyProtocol(addr);
ComboAddress mappedSource = addr;
if (!fromProxyProtocolSource && t_proxyMapping) {
- if (const auto *iter = t_proxyMapping->lookup(addr)) {
+ if (const auto* iter = t_proxyMapping->lookup(addr)) {
mappedSource = iter->second.address;
++iter->second.stats.netmaskMatches;
}
tcpConn->state = TCPConnection::BYTE0;
}
- struct timeval ttd{};
+ struct timeval ttd
+ {
+ };
Utility::gettimeofday(&ttd, nullptr);
ttd.tv_sec += g_tcpTimeout;