diff options
author | Kai Blin <kai@samba.org> | 2010-09-30 17:05:23 -0700 |
---|---|---|
committer | Kai Blin <kai@samba.org> | 2010-10-23 10:17:06 +0000 |
commit | 063727a88b10cbd27892d0e165fe18958849f7df (patch) | |
tree | 8c69c8289231c50f03abbf358533629c7d4ca23a /source4/dns_server | |
parent | 32a1b71ec8e51a2e9486c174e4b23e3942e14079 (diff) | |
download | samba-063727a88b10cbd27892d0e165fe18958849f7df.tar.gz samba-063727a88b10cbd27892d0e165fe18958849f7df.tar.bz2 samba-063727a88b10cbd27892d0e165fe18958849f7df.zip |
s4 dns: Handle CNAME records
Diffstat (limited to 'source4/dns_server')
-rw-r--r-- | source4/dns_server/dns_server.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c index 94a2cc995e..3be143067c 100644 --- a/source4/dns_server/dns_server.c +++ b/source4/dns_server/dns_server.c @@ -230,6 +230,21 @@ static NTSTATUS handle_question(struct dns_server *dns, NT_STATUS_HAVE_NO_MEMORY(ans); switch (question->question_type) { + case DNS_QTYPE_CNAME: + for (ri = 0; ri < el->num_values; ri++) { + if (recs[ri].wType != question->question_type) { + continue; + } + + ZERO_STRUCT(ans[ai]); + ans[ai].name = talloc_strdup(ans, question->name); + ans[ai].rr_type = DNS_QTYPE_CNAME; + ans[ai].rr_class = DNS_QCLASS_IP; + ans[ai].ttl = recs[ri].dwTtlSeconds; + ans[ai].rdata.cname_record = talloc_strdup(ans, recs[ri].data.cname); + ai++; + } + break; case DNS_QTYPE_A: for (ri = 0; ri < el->num_values; ri++) { if (recs[ri].wType != question->question_type) { |