summaryrefslogtreecommitdiffstats
path: root/dnsdist-xpf.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dnsdist-xpf.cc')
-rw-r--r--dnsdist-xpf.cc7
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;
}