About dlz for bind-view
z <[email protected]> Fri, 21 Oct 2011 11:12:35 +0800
| Newsgroups | gmane.network.dns.bind9.dlz |
|---|---|
| Message-ID | <CAEzNp8ah_-m2Y3pZhJ4650_obkAX6==MQThhGY0D1ZzWoSRSSQ@mail.gmail.com> |
Hi, guys
I am not sure if dlz has supported the $view$ index for a zone record
selecting.
For example:
view "Me" {
match-clients { 127.0.0.1; };
recursion no;
dlz "Mysql zone" {
database "mysql
{host=127.0.0.1 dbname=dns ssl=false port=3306 user=root pass= }
{select name from zones where name = '$zone$' limit 1}
{select ttl, type, priority , case when
lower(type)='txt' then concat('\"', data, '\"') when lower(type)='soa'
then concat_ws(' ', data, contact, serial, refresh, retry, expire,
minimum) else data end from records where zone_name='$zone$' and host
= '$record$' and view='Me'}
{}
{select ttl, type, host, priority , case when
lower(type)='txt' then concat('\"',data,'\"') else data end , contact
, serial, refresh, retry, expire, minimum from records where zone_name
= '$zone$' and view='Me'}
{}";
};
};
As we know, the $zone$ and $record$ are actually built-in, but are
there anything like $view$? So that I do not need to specify the view
name each time.
-- Alfred
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev