Loading DnsProxyListener.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -239,7 +239,7 @@ int resNSendToAiError(int err, int rcode) { bool setQueryId(span<uint8_t> msg, uint16_t query_id) { if ((size_t)msg.size() < sizeof(HEADER)) { errno = EINVAL; LOG(ERROR) << __func__ << ": Invalid parameter"; return false; } auto hp = reinterpret_cast<HEADER*>(msg.data()); Loading Loading @@ -1085,9 +1085,14 @@ void DnsProxyListener::ResNSendHandler::run() { return; } // Restore query id and send answer if (!setQueryId({ansBuf.data(), ansLen}, original_query_id) || !sendLenAndData(mClient, ansLen, ansBuf.data())) { // Restore query id if (!setQueryId({ansBuf.data(), ansLen}, original_query_id)) { LOG(WARNING) << "ResNSendHandler::run: resnsend: failed to restore query id"; return; } // Send answer if (!sendLenAndData(mClient, ansLen, ansBuf.data())) { PLOG(WARNING) << "ResNSendHandler::run: resnsend: failed to send answer to uid " << uid << " pid " << mClient->getPid(); return; Loading getaddrinfo.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -1792,7 +1792,6 @@ static int res_searchN(const char* name, res_target* target, ResState* res, int* hp = (HEADER*)(void*)target->answer.data(); errno = 0; *herrno = HOST_NOT_FOUND; /* default, if we never query */ dots = 0; for (cp = name; *cp; cp++) dots += (*cp == '.'); Loading res_query.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -211,7 +211,6 @@ int res_nsearch(ResState* statp, const char* name, /* domain name */ int got_nodata = 0, got_servfail = 0, root_on_list = 0; int tried_as_is = 0; errno = 0; *herrno = HOST_NOT_FOUND; /* True if we never query. */ dots = 0; Loading res_send.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -780,7 +780,6 @@ same_ns: return -1; } } errno = 0; if (random_bind(statp->tcp_nssock, nsap->sa_family) < 0) { *terrno = errno; dump_error("bind/vc", nsap); Loading Loading
DnsProxyListener.cpp +9 −4 Original line number Diff line number Diff line Loading @@ -239,7 +239,7 @@ int resNSendToAiError(int err, int rcode) { bool setQueryId(span<uint8_t> msg, uint16_t query_id) { if ((size_t)msg.size() < sizeof(HEADER)) { errno = EINVAL; LOG(ERROR) << __func__ << ": Invalid parameter"; return false; } auto hp = reinterpret_cast<HEADER*>(msg.data()); Loading Loading @@ -1085,9 +1085,14 @@ void DnsProxyListener::ResNSendHandler::run() { return; } // Restore query id and send answer if (!setQueryId({ansBuf.data(), ansLen}, original_query_id) || !sendLenAndData(mClient, ansLen, ansBuf.data())) { // Restore query id if (!setQueryId({ansBuf.data(), ansLen}, original_query_id)) { LOG(WARNING) << "ResNSendHandler::run: resnsend: failed to restore query id"; return; } // Send answer if (!sendLenAndData(mClient, ansLen, ansBuf.data())) { PLOG(WARNING) << "ResNSendHandler::run: resnsend: failed to send answer to uid " << uid << " pid " << mClient->getPid(); return; Loading
getaddrinfo.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -1792,7 +1792,6 @@ static int res_searchN(const char* name, res_target* target, ResState* res, int* hp = (HEADER*)(void*)target->answer.data(); errno = 0; *herrno = HOST_NOT_FOUND; /* default, if we never query */ dots = 0; for (cp = name; *cp; cp++) dots += (*cp == '.'); Loading
res_query.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -211,7 +211,6 @@ int res_nsearch(ResState* statp, const char* name, /* domain name */ int got_nodata = 0, got_servfail = 0, root_on_list = 0; int tried_as_is = 0; errno = 0; *herrno = HOST_NOT_FOUND; /* True if we never query. */ dots = 0; Loading
res_send.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -780,7 +780,6 @@ same_ns: return -1; } } errno = 0; if (random_bind(statp->tcp_nssock, nsap->sa_family) < 0) { *terrno = errno; dump_error("bind/vc", nsap); Loading