[Pdns-dev] Change query to return srv fail for a domain

Anil Madikonda anil at madikonda.com
Sun Jan 27 12:52:11 CET 2008


Hi All,

I want to change the gmysql query to return a SRV fail to the requests for 
any domain that was set with a status of zero (disabled)

My domains table included a status field (integer field with acceptable 
values 0 = disabled, 1= enabled)

I am overriding the default sql query for the gmysql-info-zone-query by 
placing the following in the pdns.conf

gmysql-info-zone-query=select id,name,master,last_check,notified_serial,type 
from domains where name='%s' and status=1

This query is being picked up in the pdns during the next re-start

My domain table has the following

==============================================
id     name           master       type          status
1     native.com                      NATIVE     1
2     master.com                     MASTER   0
==============================================


When I query the domain master.com i get the following reply

==============================================
; REQUEST ID 3
; Operation code 0, recursion desired and not available
; Query - no error
;
; master.com.  1  IN  ALL

; Authoritative answer

master.com.  86400  IN  NS  ns3.local.net.
master.com.  86400  IN  NS  ns2.local.net.
master.com.  86400  IN  NS  ns1.local.net.
master.com.  86400  IN  SOA  ns1.local.net. admin.local.net. (
        200801240  ; Serial
        7200  ; Refresh (2 hours)
        7200  ; Retry (2 hours)
        604800  ; Expire (7 days)
        86400 )  ; Minimum (24 hours)
master.com.  86400  IN  NS  ns4.local.net.
==============================================


When I should have been getting the following reply when the domain has been 
deleted from the table

==============================================
;;; --------------------------------------------------------
;;; [01/27/2008 - 12:43:00]
;;; ALL of master.com from 192.168.1.7

; REQUEST ID 2
; Operation code 0, recursion desired and not available

; Query - server failure
;
; master.com.  1  IN  ALL
==============================================


Is there a possibility to achieve the same without deleting the domain from 
the domains table by changing the query?

I do not want to delete the domain, but just suspend it temporarily.

What query should I be changing ?

Also I do not see any query for overriding any NATIVE type domains.


Thank You

Anil




=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.84beta3a (ProxSMTP 1.6)
AntiVirus: ClamAV 0.91.2/5562 - Sat Jan 26 22:34:23 2008
by Markus Madlener @ http://www.copfilter.org




More information about the Pdns-dev mailing list