On Mon, 06 Aug 2018 at 13:41:27 +0200, Matthijs van Duin wrote:
> This problem seems to be cause by the local_soa() call in src/util.c

Which nss-mdns version are you using?

What's in the hosts: line in your /etc/nsswitch.conf?

I suspect that you and Eduard might be experiencing different issues
that have the same high-level symptom (delays in name resolution).
If that's the case, then I'll need to clone this bug for the two separate
issues. I'll also retitle the original bug to make it clearer that
it's about a specific source of delays.

On Mon, 06 Aug 2018 at 14:05:02 +0200, Matthijs van Duin wrote:
> The following patch fixes the problem for me:
> 
> diff --git c/src/util.c w/src/util.c
> index aaebd62..594ed42 100644
> --- c/src/util.c
> +++ w/src/util.c
> @@ -62,7 +62,7 @@ int verify_name_allowed_with_soa(const char* name, FILE* 
> mdns_allow_file) {
>      case VERIFY_NAME_RESULT_ALLOWED:
>          return 1;
>      case VERIFY_NAME_RESULT_ALLOWED_IF_NO_LOCAL_SOA:
> -        return !local_soa();
> +        return 1;
>      default:
>          return 0;
>      }

This effectively disables the code that tries to avoid interfering with
a .local domain if one exists in normal (non-multicast) DNS, so it's
likely to solve problems for some people but cause problems for others.

If you try to resolve a SOA record through your normal DNS resolver,
does that hang for a long time? These commands' output would be useful
information:

time host -t SOA debian.org.
time host -t SOA local.

If you happen to have macOS or Windows on the same LAN, it would also
be interesting to know whether they suffer similar delays for mDNS
resolution: the code disabled by the patch above is a standard heuristic
used in multiple (perhaps all) mDNS implementations, for example
<https://support.apple.com/en-us/HT201275> in macOS.

Thanks,
    smcv

Reply via email to