diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 06:28:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 06:28:37 +0000 |
commit | 037d41a914237592dc3e82751b8be3ff06407af0 (patch) | |
tree | f111444510b128085cbd03f7e72bcddcdef8a7e3 /dnsdist-dnsparser.cc | |
parent | Releasing progress-linux version 1.9.4-1~progress7.99u1. (diff) | |
download | dnsdist-037d41a914237592dc3e82751b8be3ff06407af0.tar.xz dnsdist-037d41a914237592dc3e82751b8be3ff06407af0.zip |
Merging upstream version 1.9.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dnsdist-dnsparser.cc')
-rw-r--r-- | dnsdist-dnsparser.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/dnsdist-dnsparser.cc b/dnsdist-dnsparser.cc index a15f2d5..bfe0be3 100644 --- a/dnsdist-dnsparser.cc +++ b/dnsdist-dnsparser.cc @@ -214,4 +214,23 @@ namespace PacketMangling return true; } } + +void setResponseHeadersFromConfig(dnsheader& dnsheader, const ResponseConfig& config) +{ + if (config.setAA) { + dnsheader.aa = *config.setAA; + } + if (config.setAD) { + dnsheader.ad = *config.setAD; + } + else { + dnsheader.ad = false; + } + if (config.setRA) { + dnsheader.ra = *config.setRA; + } + else { + dnsheader.ra = dnsheader.rd; // for good measure + } +} } |