diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:14:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:14:49 +0000 |
commit | 2f230033794fafdf10822568e763d4db68cf6c6b (patch) | |
tree | 39ca5c2325b7b43c9a28ca6d4ad4026a61e7eb97 /dnsdist-xpf.cc | |
parent | Adding debian version 1.8.3-3. (diff) | |
download | dnsdist-2f230033794fafdf10822568e763d4db68cf6c6b.tar.xz dnsdist-2f230033794fafdf10822568e763d4db68cf6c6b.zip |
Merging upstream version 1.9.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dnsdist-xpf.cc')
-rw-r--r-- | dnsdist-xpf.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dnsdist-xpf.cc b/dnsdist-xpf.cc index 6f4cba5..eb2ba57 100644 --- a/dnsdist-xpf.cc +++ b/dnsdist-xpf.cc @@ -22,6 +22,7 @@ #include "dnsdist-xpf.hh" +#include "dnsdist-dnsparser.hh" #include "dnsparser.hh" #include "xpf.hh" @@ -54,7 +55,9 @@ bool addXPF(DNSQuestion& dq, uint16_t optionCode) pos += payload.size(); (void) pos; - dq.getHeader()->arcount = htons(ntohs(dq.getHeader()->arcount) + 1); - + dnsdist::PacketMangling::editDNSHeaderFromPacket(dq.getMutableData(), [](dnsheader& header) { + header.arcount = htons(ntohs(header.arcount) + 1); + return true; + }); return true; } |