hi Robert,

i have a question from a user which i can not answer with 100% correctness. perhaps you can help us, because the mentioned code line was introduced before my code.

Thanks in advance!


cheers
ronny

Begin forwarded message:

Date: Fri, 26 Jul 2013 08:33:37 -0700
From: Pert <notifications@github.com>
To: contiki-os/contiki <contiki@noreply.github.com>
Cc: rklauck <rklauck@informatik.tu-cottbus.de>
Subject: Re: [contiki] DNS Service Discovery (DNS-SD) support in resolv.c (#255)


> @@ -842,7 +1007,11 @@ enum {
>  
>        if(((uip_ntohs(question->class) & 0x7FFF) != DNS_CLASS_IN) ||
>           ((question->type != UIP_HTONS(DNS_TYPE_ANY)) &&
> -          (question->type != UIP_HTONS(NATIVE_DNS_TYPE)))) {
> +          (question->type != UIP_HTONS(NATIVE_DNS_TYPE))
> +/* TODO #if RESOLV_CONF_SUPPORTS_DNS_SD
> +          && (question->type != UIP_HTONS(DNS_TYPE_PTR))
> +#endif */
> +      )){
>          /* Skip unrecognised records. */
>          continue;
>        }

Hi rklauck, while using your code for bridging mdns to a service discoverer on our pc we found the following code 
line 1018

if(!dns_name_isequal(queryptr, resolv_hostname, uip_appdata)) {
        continue;
}

I think there is some sort of problem in that line.

For reproducing the issue just build udp-client and udp-server from examples/udp-ipv6 directory.

without knowing what this code exactly does I found that when is commented out the udp-ipv6 client and servers just runs correctly, if the server starts before the client, the server will announce its services when the client will send the request, while when this line is not commented the server just sends the mdns announcement when starts.

Do you know why this line is here? is it safe to drop it?

P.S. also changing RESOLV_CONF_MAX_MDNS_RETRIES from 3 to 1 leads to less replies when some service is requested (but I don't think this is a bug)

thanks

---
Reply to this email directly or view it on GitHub:
https://github.com/contiki-os/contiki/pull/255/files#r5425301


-- 
Dipl.-Inf. Ronny Klauck
Brandenburg University of Technology Cottbus
Computer Networks Group
http://www-rnks.informatik.tu-cottbus.de/~rklauck