[
https://issues.apache.org/jira/browse/THRIFT-2539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14015282#comment-14015282
]
Randy Abernethy commented on THRIFT-2539:
-----------------------------------------
Hey Michal,
As Jens mentioned people use Apache Thrift all the time for local IPC and we
certainly want it to work for your use case.
RFC 3493 states:
" If the AI_ADDRCONFIG flag is specified, IPv4 addresses shall be
returned only if an IPv4 address is configured on the local system,
and IPv6 addresses shall be returned only if an IPv6 address is
configured on the local system. The loopback address is not
considered for this case as valid as a configured address."
Some resolver implementations ignore the above guidance and return a local
loopback addr anyway (like Windows XP). When referencing a network addr on a
networked system, the AI_ADDRCONFIG flag keeps some resolver implementations
from doing long (useless) remote getaddrinfo() lookups.
So we only want to not use this flag in cases where there is actually no
network to avoid impacting other environments which work just fine right now.
I haven't had time to try the change proposed in my last post but the idea is
to let the networked users keep their current experience and yet, if the first
request to getaddrinfo() fails, fall back to a call without AI_ADDRCONFIG for
local loopback users. Maybe there's a better approach but whatever we do we
need to preserve the functionality expected by the thousands of current network
users when we make the change.
-Randy
> Tsocket.cpp addrinfo ai_flags = AI_ADDRCONFIG
> ---------------------------------------------
>
> Key: THRIFT-2539
> URL: https://issues.apache.org/jira/browse/THRIFT-2539
> Project: Thrift
> Issue Type: Question
> Affects Versions: 0.9.1
> Reporter: MichaĆ Gazda
> Assignee: Randy Abernethy
> Attachments: THRIFT-2539-my-new-feature.patch, TSocket.cpp
>
>
> While creating and using thrift based app we have found some problem on
> windows 7 which was not present on winxp. When we try to open socket with
> local_open() for the host name "localhost" getaddrinfo fails with 11004. What
> is important we do not have any physical network address as all network cards
> are disabled in the system. As I assume it is connected wit he flag
> AI_ADDRCONFIG. Why it is set by default? I wonder if I do remove it can it
> cause some problems? I would like our app to be able to communicate locally
> even if there is no external network available.
> Hope to get quick reply, thank you.
--
This message was sent by Atlassian JIRA
(v6.2#6252)