dns_add_srch() initialization problem
Michael Tokarev
mjt+udns at corpit.ru
Mon May 7 17:13:44 MSK 2018
30.04.2018 07:48, Lennert Buytenhek wrote:
> Preved!
>
> udns seems to insist on twice repeating queries for nonexistent domain
> names with my local search path appended, which seems to be due to a
> bug in dns_init_resolvconf()?
>
>
> --- udns_init.c.orig 2018-04-30 07:41:41.533514452 +0300
> +++ udns_init.c 2018-04-30 07:41:43.789510882 +0300
> @@ -204,7 +204,7 @@
> dns_set_opts(ctx, v);
>
> /* if still no search list, use local domain name */
> - if (has_srch &&
> + if (!has_srch &&
> gethostname(buf, sizeof(buf) - 1) == 0 &&
> (v = strchr(buf, '.')) != NULL &&
> *++v != '\0')
Oh. Indeed, the condition is the opposite. Applied, thank you!
/mjt
More information about the udns
mailing list