[zeromq-dev] OpenPGM and IPv6 interfaces

Steven McCoy steven.mccoy at miru.hk
Tue Feb 2 03:33:39 CET 2010


On 2 February 2010 00:24, Martin Lucina <mato at kotelna.sk> wrote:

> Hi Steven,
>
> we've found some odd behaviour with OpenPGM and IPv6 interfaces.
>
> When trying to bind a socket to a 0MQ endpoint such as
> udp://eth0;224.0.0.1:5555 the call was failing intermittently.
>
> Martin Sustrik tracked down the error from OpenPGM and it was
> PGM_IF_ERROR_NOTUNIQ. It turns out this was happening because his box has
> IPv6 enabled by default, so OpenPGM (correctly) says that "eth0" is not
> unique. Not sure why it fails sometimes and sometimes it works though.
>

If you are specifying just "eth0;" it will return NOTUNIQ, however
specifying a multicast address from one family will force the interface to
be resolved using the family of the group.  All my boxes have both IPv4 and
IPv6 addresses and hence why this was implemented.

If you enable IF_DEBUG you can see the resolution:

2010-02-02 10:28:48 ayaka Pgm: get_transport_info
(network:"eth0;239.192.0.1" hints:(nil) res:0x7fffd0271cb8
error:0x7fffd0271cb0)
2010-02-02 10:28:48 ayaka Pgm: network_parse (network:"eth0;239.192.0.1"
family:AF_UNSPEC recv_list:0x7fffd0271c60 send_list:0x7fffd0271c58
error:0x7fffd0271cb0)
2010-02-02 10:28:48 ayaka Pgm: parse_interface_entity (family:AF_UNSPEC
entity:"eth0" interface_list:0x7fffd02717c8 error:0x7fffd02717c0)
2010-02-02 10:28:48 ayaka Pgm: parse_interface (family:AF_UNSPEC
ifname:"eth0" ir:0x66d250 error:0x7fffd0271738)
2010-02-02 10:28:48 ayaka Pgm: parse_receive_entity (family:AF_UNSPEC
entity:"239.192.0.1" interface_list:0x7fffd02717c8 recv_list:0x7fffd0271c60
error:0x7fffd0271cb0)
2010-02-02 10:28:48 ayaka Pgm: Address family of receive group cannot be
determined from interface.
2010-02-02 10:28:48 ayaka Pgm: parse_group (family:AF_UNSPEC
group:"239.192.0.1" addr:0x66e8d8 error:0x7fffd0271cb0)
2010-02-02 10:28:48 ayaka Pgm: parse_interface (family:AF_INET ifname:"eth0"
ir:0x7fffd0271620 error:0x7fffd0271cb0)
2010-02-02 10:28:48 ayaka Pgm: parse_send_entity (family:AF_UNSPEC
entity:(null) interface_list:0x7fffd02717c8 recv_list:0x7fffd0271c60
send_list:0x7fffd0271c58 error:0x7fffd0271cb0)

This looks like a bug as I'm getting an error too,

** ERROR **: binding transport: No matching network interface index: 2



> Anyway, we discussed further how IPv6 support should resolve names and I
> think we're getting a consensus that 0MQ should have separate IPv4 and IPv6
> transports, otherwise things get messy for the caller. So something like:
>
> tcp://, tcp6://, udp://, udp6://, pgm://, pgm6://
>
> Where the IPv4 transport would not accept or resolve IPv6 addresses and
> vice versa.
>
> What do you think, is this a good idea?
>

It's kind of like ping and ping6, it would be nice to have just one ping.


>
> Further, is there a way to tell OpenPGM to please resolve only IPv4/v6,
> which is something we'd need to implement this?
>
>
You can provide an address family to the pgm_if_get_transport_info call via
the ti_family field of the pgm_transport_info_t parameter.

-- 
Steve-o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100202/4a8c63dd/attachment.htm>


More information about the zeromq-dev mailing list