recs[i].wtype is == DNS_TYPE_CNAME, and my understanding of the union is that
data.cname is filled. We get away with this, because ipv4 and ipv6 have the
same char * representation, but it's confusing.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Aug 4 13:41:17 CEST 2015 on sn-devel-104
/* First build up the new question */
new_q->question_type = question->question_type;
new_q->question_class = question->question_class;
- if (new_q->question_type == DNS_QTYPE_A) {
- new_q->name = talloc_strdup(new_q, recs[ri].data.ipv4);
- } else if (new_q->question_type == DNS_QTYPE_AAAA) {
- new_q->name = talloc_strdup(new_q, recs[ri].data.ipv6);
- }
+ new_q->name = talloc_strdup(new_q, recs[ri].data.cname);
if (new_q->name == NULL) {
TALLOC_FREE(new_q);
return WERR_NOMEM;