Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2014
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. fixupsdomains = {}
  2. function addToSet(set, key)
  3. set[key] = true
  4. end
  5.  
  6. function removeFromSet(set, key)
  7. set[key] = nil
  8. end
  9.  
  10. function setContains(set, key)
  11. return set[key] ~= nil
  12. end
  13.  
  14.  
  15. addToSet(fixupsdomains, "suomi24-mx.cloudapp.net.");
  16.  
  17. -- records contains the entire packet, ready for your modifying pleasure
  18. function postresolve ( remoteip, domain, qtype, records, origrcode )
  19. -- print ("postresolve called for: ", remoteip, getlocaladdress(), domain, qtype, origrcode, pdns.loglevels.Info)
  20.  
  21. if(qtype== pdns.AAAA and origrcode==pdns.SERVFAIL and setContains(fixupsdomains, domain))
  22. then
  23. setvariable()
  24. origrcode=0;
  25. end
  26. return origrcode, records
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement