K
Also irgendwie klappt das immer noch nicht so ganz. Folgende DLZ-Konfig:
dlz "mydlz"
{
database "mysql
{host=myhost dbname=mydb user=myuser pass=mypass}
{SELECT zone FROM dns_records where zone = '$zone$' group by zone}
{SELECT ttl, type, mx_priority, CASE WHEN lower(type)='txt' THEN concat('\"', data, '\"') WHEN lower(type) = 'soa' THEN concat_ws(' ', data, resp_contact, serial, refresh, retry, expire, minimum) ELSE data END FROM dns_records WHERE zone = '$zone$' AND host = '$record$'}
{}
{SELECT ttl, type, host, mx_priority, CASE WHEN lower(type)='txt' THEN concat('\"', data, '\"') ELSE data END, resp_contact, serial, refresh, retry, expire, minimum FROM dns_records WHERE zone = '$zone$'}
{SELECT zone FROM xfr WHERE zone = '$zone$' AND client = '$client$'}";
};
Fuehre ich nun einen Zonentransfer durch, dann bekomme ich:
13-Mar-2014 15:05:52.413 database: debug 1:
Query String: SELECT zone FROM dns_records where zone = 'meinedomain.at' group by zone
13-Mar-2014 15:05:52.413 database: debug 1:
Query String: SELECT zone FROM xfr WHERE zone = 'meinedomain.at' AND client = '127.0.0.1'
13-Mar-2014 15:05:52.413 database: debug 1:
Query String: SELECT ttl, type, mx_priority, CASE WHEN lower(type)='txt' THEN concat('"', data, '"') WHEN lower(type) = 'soa' THEN concat_ws(' ', data, resp_contact, serial, refresh, retry, expire, minimum) ELSE data END FROM dns_records WHERE zone = 'meinedomain.at' AND host = '@'
13-Mar-2014 15:05:52.414 general: error: dns_rdata_fromtext: buffer-0x7fff5bdb45a0:1: near eof: unexpected end of input
13-Mar-2014 15:05:52.414 database: error: dns_sdlz_putrr returned error. Error code was: unexpected end of input
13-Mar-2014 15:05:52.414 database: debug 1:
Query String: SELECT ttl, type, mx_priority, CASE WHEN lower(type)='txt' THEN concat('"', data, '"') WHEN lower(type) = 'soa' THEN concat_ws(' ', data, resp_contact, serial, refresh, retry, expire, minimum) ELSE data END FROM dns_records WHERE zone = 'meinedomain.at' AND host = '*'
13-Mar-2014 15:05:52.414 general: error: journal.c:171: unexpected error:
13-Mar-2014 15:05:52.414 general: error: missing SOA
"unexpected end of input"? Und warum startet er eine zweite Query mit host='*'?