On Fri, Apr 11, 2014 at 02:55:20PM +0200, Martijn Otto wrote:
> 
> > FYI, with getaddrinfo() - with Nenad's patch - against a dual-stacked host
> > and without IPv6 connectivity leads to additional syscalls in this case:
> > 
> > connect(4, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, 
> > "2a03:2880:f010:900:face:b00c:0:1", &sin6_addr), sin6_flowinfo=0, 
> > sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable)
> > connect(4, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 
> > 16) = 0
> > connect(4, {sa_family=AF_INET, sin_port=htons(0), 
> > sin_addr=inet_addr("31.13.81.144")}, 16) = 0
> > 
> > 
> > Also we need to be aware that browsers do a lot of tricks to fix IPv6
> > blackholes (RFC6555), while we don't.
> > 
> > 
> > By using this approach we switch from default IPv4 to default IPv6.
> > 
> > 
> > I agree that this makes sense and needs to be done, I'm just raising
> > awareness of the problems we may see when starting to do so.
> 
> This is really the responsibility of the server admin. If you use
> getaddrinfo(), this behavior can be configured in /etc/gai.conf. This is
> the preferred way to go. It's consistent and documented.

No, if *someone* built your package for you to use getaddrinfo() and you
are the admin trying to get it to work without even being aware of this
behaviour (ie 99% of admins), then you'll pull all your hair before getting
your issues fixed.

I'm OK with using an explicit config prefix to say "I want to use getaddrinfo"
but not to make all users suddenly get into trouble because of random
resolving issues leading to sometimes using IPv4, sometimes IPv6 depending
on the weather.

Willy


Reply via email to