[zeromq-dev] ZMQ Crash from unknown DNS name

David Kantowitz dkantowitz at gmail.com
Thu Jan 27 09:51:56 CET 2011


On Thu, Jan 27, 2011 at 12:44 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:

> On 01/27/2011 09:28 AM, David Kantowitz wrote:
>
>     The real solution IMO would be to introduce a new "address"
>>    structure that would contain the address as such, with no elements
>>    to resolve.
>>
>> When will sockaddr_storage be insufficient?
>>
>
> We have following transports that have to be taken into account:
>
> 1. TCP (IPv4)
> 2. IPC
> 3. INPROC
> 4. PGM
> 5. EPGM
>
> 1 and 2 fit into sockaddr_storage naturally. The others are to be
> consided...
>
> Martin
>

Is it really that bad to parse and process the transport URL twice?
   1. I'd guess (but I'm not sure) most applications don't call connect()
very often.
   2. The bind library probably cached the name lookup.

It almost seems simpler to use the URL as the internal endpoint instead of
making a new address structure.  Maybe the thing to do is re-write the URL
replacing the DNS name with the resolved IP address before passing it onto
the i/o thread.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110127/04be3caa/attachment.htm>


More information about the zeromq-dev mailing list