~ubuntu-branches/ubuntu/precise/pdns-recursor/precise

« back to all changes in this revision

Viewing changes to powerdns-example-script.lua

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Möhlmann
  • Date: 2011-01-22 16:39:02 UTC
  • mto: (1.1.8 upstream) (4.2.10 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20110122163902-ee067v1pnad3f1zl
Import upstream version 3.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
function preresolve ( remoteip, domain, qtype )
2
2
        print ("prequery handler called for: ", remoteip, getlocaladdress(), domain, qtype)
3
3
        pdnslog("a test message.. received query from "..remoteip.." on "..getlocaladdress());
 
4
 
 
5
        if domain == "www.donotcache.org."
 
6
        then
 
7
                print("making sure www.donotcache.org will never end up in the cache")
 
8
                setvariable()
 
9
                return -1, {}
 
10
        end
 
11
 
4
12
        if domain == "www.powerdns.org." 
5
13
        then
6
14
                ret={}