Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fixupsdomains = {}
- function addToSet(set, key)
- set[key] = true
- end
- function removeFromSet(set, key)
- set[key] = nil
- end
- function setContains(set, key)
- return set[key] ~= nil
- end
- addToSet(fixupsdomains, "suomi24-mx.cloudapp.net.");
- -- records contains the entire packet, ready for your modifying pleasure
- function postresolve ( remoteip, domain, qtype, records, origrcode )
- -- print ("postresolve called for: ", remoteip, getlocaladdress(), domain, qtype, origrcode, pdns.loglevels.Info)
- if(qtype== pdns.AAAA and origrcode==pdns.SERVFAIL and setContains(fixupsdomains, domain))
- then
- setvariable()
- origrcode=0;
- end
- return origrcode, records
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement