On Tue, May 17, 2016 at 2:56 PM, Stuart Henderson <s...@spacehopper.org> wrote:
> On 2016/05/17 08:27, Brent Cook wrote: > > This patch came by way of the openntpd github. Linux (and possibly > others) > > will attempt to bind to 0.0.0.0 when binding to '::' and return an error > if > > it can't, unless IPV6_V6ONLY is set. > > Do you see why they're doing this? > > In an OS where IPV6_V6ONLY=0 is the default (i.e. allowing v4 on > v6 sockets), someone binds to :: expecting to pick up all traffic. > > Now another user's process binds to 0.0.0.0. > > I honestly don't think a lot of people realize when IPV6_V6ONLY=0 and when it doesn't. It's a surprising default. Maybe it should actually log a more visible warning. My goal is to make OpenNTPD work as closely as possible on other OSes as it does on OpenBSD. Sometimes this means injecting compatibility layers between the system and the program (it shares LibreSSL's arc4random selection code for instance). I'm probably making it too easy on upstream OSes in the interest of OpenNTPD-portable's direct users, but this seems preferable to having different behavior between OpenBSD and other OSes.