Skip to content

Commit

Permalink
Merge pull request #14186 from Habbie/backport-14047-to-auth-4.9.x
Browse files Browse the repository at this point in the history
auth 4.9 dnsproxy: fix build on s390x
  • Loading branch information
Habbie committed May 17, 2024
2 parents 400e938 + f561ddc commit 20d312a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pdns/dnsproxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,11 @@ void DNSProxy::mainloop()
memcpy(&dHead, &buffer[0], sizeof(dHead));
{
auto conntrack = d_conntrack.lock();
#if BYTE_ORDER == BIG_ENDIAN
// this is needed because spoof ID down below does not respect the native byteorder
d.id = (256 * (uint16_t)buffer[1]) + (uint16_t)buffer[0];
#endif
if (BYTE_ORDER == BIG_ENDIAN) {
// this is needed because spoof ID down below does not respect the native byteorder
dHead.id = (256 * (uint16_t)buffer[1]) + (uint16_t)buffer[0];
}

auto iter = conntrack->find(dHead.id ^ d_xor);
if (iter == conntrack->end()) {
g_log << Logger::Error << "Discarding untracked packet from recursor backend with id " << (dHead.id ^ d_xor) << ". Conntrack table size=" << conntrack->size() << endl;
Expand Down

0 comments on commit 20d312a

Please sign in to comment.