if record:qtype() == pdns.HINFO then
resp = {}
resp[1] = {
- qname = record:qname:toString(),
+ qname = record:qname():toString(),
qtype = pdns.TXT,
ttl = 99,
content = "Hello Ahu!"
end
-- Grab each _tstamp TXT record and add a time stamp
- if record:qtype() == pdns.TXT and string.starts(record:qname:toString(), "_tstamp.") then
+ if record:qtype() == pdns.TXT and string.starts(record:qname():toString(), "_tstamp.") then
resp = {}
resp[1] = {
qname = record:qname():toString(),
if record:qtype() == pdns.A then
resp = {}
resp[1] = {
- qname = record:qname:toString(),
+ qname = record:qname():toString(),
qtype = pdns.TXT,
ttl = 99,
content = "Hello Ahu, again!"
ret = d_axfr_filter(remote, zone, in);
rcode = std::get<0>(ret);
- if (rcode < 0)
+ if (rcode < 0) {
+ // no modification, handle normally
return false;
- else if (rcode == 1)
+ }
+ else if (rcode == 0) {
+ // replace the matching record by the filtered record(s)
+ }
+ else if (rcode == 1) {
+ // append the filtered record(s) after the matching record
out.push_back(in);
+ }
else
throw PDNSException("Cannot understand return code "+std::to_string(rcode)+" in axfr filter response");