Bugfix: populate_answers() was not adding records if type is RR_ANY (since rev ea6495c).

This commit is contained in:
Darell Tan 2012-10-17 22:59:22 +08:00
parent ac1908875b
commit 70b254aec8

View File

@ -173,7 +173,7 @@ static int populate_answers(struct mdnsd *svr, struct rr_list **rr_head, uint8_t
if (type == RR_ANY && n->e->type == RR_NSEC)
continue;
if (type == n->e->type && cmp_nlabel(name, n->e->name) == 0) {
if ((type == n->e->type || type == RR_ANY) && cmp_nlabel(name, n->e->name) == 0) {
num_ans += rr_list_append(rr_head, n->e);
}
}