[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH 1/1] busybox: make ntpd prefer IPv6 addresses
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2016-08-21 2:39:45
Message-ID: CAK1hOcNEg9rkjpHtHru+CabRYeopgpy2LXpWygxnizLVsbkxBA () mail ! gmail ! com
[Download RAW message or body]

On Thu, Aug 18, 2016 at 1:59 PM, Christophe Prévotaux
<c.prevotaux@rural-networks.com> wrote:
> On Sun, 14 Aug 2016 01:25:44 +0200
> Denys Vlasenko <vda.linux@googlemail.com> wrote:
>
>> On Mon, Aug 8, 2016 at 11:17 AM, Christophe Prévotaux
>> <c.prevotaux@rural-networks.com> wrote:
>> > Hello,
>> >
>> > Could someone please integrate this patch in busybox please ?
>> >
>> > Please note I am not the author of this patch. But it is a very much needed
>> > patch for people who have only ipv6 connectivity.
>> >
>> > https://dev.openwrt.org/attachment/ticket/12167/0001-busybox-make-ntpd-prefer-IPv6-addresses.patch
>>
>>
>> :ntpd uses host2sockaddr to get the first address returned by DNS and
>> does so only once.
>> :Since the first address is often an IPv4 address, this causes ntpd to
>> fail in IPv6 only environments.
>>
>> Fix either your DNS (or your IPv4 routing) then.
>> If IPv4 doesn't work on your network, why do your DNS server
>> responds with such addresses? Fixing each and every app
>> to work around this is not feasible.
>
> I do not think you understand the problem, maybe I did not explain it well
> enough. I am using an IPv6 system and ntpd is bound to an IPv6 only
> interface in my scenario, therefore in that case the DNS used does not
> matter.
>
> But even if I could fix all the DNSes of the planet and resolver,

You do not need to fix all resolvers. You need to fix only yours.
If your ISP provider's DNS server is not doing what you want,
you can run your own, on your machine. (As a bonus,
its cached responses will be blindingly fast).
You can configure it as you want. For example,
since you know your machine can't use IPv4,
make it drop IPv4 addresses, at least from the names which also
have IPv6 ones.

This is much more feasible approach than "fixing" every program
in existence.

> Even if my first proposed solution was incorrect, would it be possible to have
> like a -6 flag on the ntpd of busybox to make it use only IPv6,  is that something possible ?

It's possible. It's just wrong.
ntpd does not need to know anything about IPv4 or IPv6.

Most of networking tools in busybox do not know these details,
they are abstracted out.
Such as: "connect to "HOSTNAME:PORT", give me a connected fd".
If IPv9 appears tomorrow, there will be no need to rewrite
each and every network tool in busybox.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic