[zeromq-dev] zmq_forwarder fails when my machine is not on the internet

Martin Lucina mato at kotelna.sk
Wed Jul 21 17:33:31 CEST 2010


sustrik at 250bpm.com said:
> What do you think about the patch below? Should I commit it to the trunk?

The patch as suggested by Dhammika will only work for "" and not
for "localhost" since inet_pton() only takes numeric addresses.

After som experimental testing and reading the RFC (thanks for the
pointer!) the best thing to do right now is just to drop the AI_ADDRCONFIG
flag from the call to getaddrinfo(). Since we're explicitly requesting
AF_INET addresses only we will never get AF_INET6 results back.

I have committed a patch to this effect to zeromq2/master. The issue will
have to be revisited at such time that someone will be implementing IPv6
support, obviously the current code will not work at all on hosts with IPv6
connectivity only.


More information about the zeromq-dev mailing list