Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACOXvng1qFZhLVeKbB7UeNfEJOsRWb9cm8RhW6DMzMHEtFnJQg@mail.gmail.com>
Date: Mon, 17 Apr 2017 20:41:34 +0000
From: Stefan Sedich <stefan.sedich@...il.com>
To: musl@...ts.openwall.com
Subject: Re: [PATCH v2] attempts option not being respected in resolv.conf

Any thoughts from anybody on this? I want to tweak my attempts settings but
at the moment they are not read at all.



Thanks

On Mon, Apr 3, 2017 at 7:08 PM Stefan Sedich <stefan.sedich@...il.com>
wrote:

> One thing I have found though is that the way the retry logic works if I
> want to retry ever 1 second for a total of 5 times I need to set it to
> 'options timeout:5 attempts:5', not sure if someone who knows this area
> well can comment but it appears to create a retry_interval based on
> timeout/attempts, which as far as I understand it is different to how it
> works with glibc where I can set timeout:1 attempts:5 and it does as I
> expect.
>
>
>
> - Stefan
>
> On Mon, Apr 3, 2017 at 5:37 PM Stefan Sedich <stefan.sedich@...il.com>
> wrote:
>
> This fixes an issue were the attempts was not being recpected in
> resolv.conf, from what I could see
> it used to work this way but changed some time during the refactor to
> resolvconf.
>
> ---
>  src/network/resolvconf.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/network/resolvconf.c b/src/network/resolvconf.c
> index 2cf1f475..4c3e4c4b 100644
> --- a/src/network/resolvconf.c
> +++ b/src/network/resolvconf.c
> @@ -45,8 +45,8 @@ int __get_resolv_conf(struct resolvconf *conf, char
> *search, size_t search_sz)
>                                 if (z != p) conf->ndots = x > 15 ? 15 : x;
>                         }
>                         p = strstr(line, "attempts:");
> -                       if (p && isdigit(p[6])) {
> -                               p += 6;
> +                       if (p && isdigit(p[9])) {
> +                               p += 9;
>                                 unsigned long x = strtoul(p, &z, 10);
>                                 if (z != p) conf->attempts = x > 10 ? 10 :
> x;
>                         }
> --
> 2.11.0
>
>

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.