Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. function preresolve(dq)
  2.     -- In preresolve I would like to set some flag that postresolve will see.
  3.     local data = {}
  4.     data['dont_modify'] = "1"
  5.     dq.data = data
  6.  
  7.     return false
  8. end
  9.  
  10. function postresolve(dq)
  11.     -- This block never ends up happening.
  12.     if dq.data.dont_modify == "1" then
  13.         return false
  14.     end
  15.  
  16.     dq.variable = true
  17.     dq.rcode = pdns.NOERROR
  18.     dq:addAnswer(pdns.CNAME, 'test.com', 60)
  19.     return true
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement