X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fmdnsd.git;a=blobdiff_plain;f=dns.c;h=63788f73ebdb708ea66ac2e83e920e152ca68aed;hp=89cd4ce5a76fc4ebd736784cf6d6fcbe4180bf0d;hb=9bbaf3c1f7826a7ac637ac0e2e7c8d5b43bac89d;hpb=9cbbb141068c12ed032736e20f982e2a0fb43edc diff --git a/dns.c b/dns.c index 89cd4ce..63788f7 100644 --- a/dns.c +++ b/dns.c @@ -67,7 +67,7 @@ dns_type_string(uint16_t type) } void -dns_send_question(struct interface *iface, const char *question, int type, int unicast) +dns_send_question(struct interface *iface, const char *question, int type, int multicast) { static struct dns_header h; static struct dns_question q; @@ -87,7 +87,7 @@ dns_send_question(struct interface *iface, const char *question, int type, int u int len; h.questions = cpu_to_be16(1); - q.class = cpu_to_be16(((unicast) ? (CLASS_UNICAST) : (0)) | 1); + q.class = cpu_to_be16((multicast ? 0 : CLASS_UNICAST) | 1); q.type = cpu_to_be16(type); len = dn_comp(question, (void *) dns_buffer, sizeof(dns_buffer), NULL, NULL);