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.46 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.  
  12.     -- PROBLEM: This block never ends up happening.
  13.     if dq.data.dont_modify == "1" then
  14.         return false
  15.     end
  16.  
  17.     dq.variable = true
  18.     dq.rcode = pdns.NOERROR
  19.     dq:addAnswer(pdns.CNAME, 'test.com', 60)
  20.     return true
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement