Skip to content

Commit

Permalink
dnsdist: clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
rgacogne committed Jan 10, 2025
1 parent 7b34056 commit 98151bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pdns/dnsdistdist/dnsdist-lua-ffi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ void dnsdist_ffi_dnsquestion_set_http_response(dnsdist_ffi_dnsquestion_t* dq, ui
{
#if defined(HAVE_DNS_OVER_HTTPS)
if (dq->dq->ids.du) {
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic): C API
PacketBuffer bodyVect(body, body + bodyLen);
dq->dq->ids.du->setHTTPResponse(statusCode, std::move(bodyVect), contentType);
dnsdist::PacketMangling::editDNSHeaderFromPacket(dq->dq->getMutableData(), [](dnsheader& header) {
Expand All @@ -511,6 +512,7 @@ void dnsdist_ffi_dnsquestion_set_http_response(dnsdist_ffi_dnsquestion_t* dq, ui
#endif
#if defined(HAVE_DNS_OVER_HTTP3)
if (dq->dq->ids.doh3u) {
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic): C API
PacketBuffer bodyVect(body, body + bodyLen);
dq->dq->ids.doh3u->setHTTPResponse(statusCode, std::move(bodyVect), contentType);
dnsdist::PacketMangling::editDNSHeaderFromPacket(dq->dq->getMutableData(), [](dnsheader& header) {
Expand Down
1 change: 1 addition & 0 deletions pdns/dnsdistdist/doh3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ static void h3_send_response(H3Connection& conn, const uint64_t streamID, uint16
addHeaderToList(headers, "content-type", sizeof("content-type") - 1, s_redirectContentType.data(), s_redirectContentType.size());
responseBody.reserve(s_redirectStart.size() + len + s_redirectEnd.size());
responseBody.insert(responseBody.begin(), s_redirectStart.begin(), s_redirectStart.end());
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
responseBody.insert(responseBody.end(), body, body + len);
responseBody.insert(responseBody.end(), s_redirectEnd.begin(), s_redirectEnd.end());
body = responseBody.data();
Expand Down

0 comments on commit 98151bd

Please sign in to comment.