[Xcb] [PATCH] Bug: Can’t connect to localhost without global connectivity
Jamey Sharp
jamey at minilop.net
Mon Aug 15 08:45:02 PDT 2011
On Sat, Aug 13, 2011 at 09:54:05PM +0200, Michael Stapelberg wrote:
> Basically, we have two possibilities:
>
> 1) Drop the AI_ADDRCONFIG flag. This will result in getting IPv4 *and*
> IPv6 addresses for names like "localhost" or any domain name which
> has AAAA and A records. The results will be sorted according to RFC
> 3484 so that a system without a configured (and native, as in
> not-tunneled) IPv6 address will try the IPv4 record first.
>
> So the difference is that if the IPv4 address does not work, systems
> without IPv6 will still try to open a socket and connect via IPv6,
> which will fail immediately. Since XCB does not signal these errors
> anyways (it will only say that the X connection has some error),
> this is not a problem at all.
>
> The fix in this case is to just remove the AI_ADDRCONFIG flag
> entirely.
Apparently Josh and I used that flag when we first switched to
getaddrinfo in commit 48776ce233bf77fbaddbe972d2356bca69094239, from
2006. Five years later, I have no idea why. Josh?
I see no strong reason to keep using that flag, but I'd like to know if
anybody else does.
Jamey
p.s. I'm not even sure why flags like this exist. Seems like it should
be site policy, never per-application policy. How is the application
supposed to know?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20110815/bcebe003/attachment.pgp>
More information about the Xcb
mailing list