From bc90231227a84f4b7dffe432a8efa70b75c19031 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 4 Feb 2010 09:39:57 +0100 Subject: contrain interface name resolving in OpenPGM to IPv4 interfaces --- src/pgm_socket.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/pgm_socket.cpp') diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp index 8160ca6..64bf02f 100644 --- a/src/pgm_socket.cpp +++ b/src/pgm_socket.cpp @@ -30,6 +30,7 @@ #endif #include +#include #include #include "options.hpp" @@ -131,8 +132,11 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_) } struct pgm_transport_info_t *res = NULL; - - if (!pgm_if_get_transport_info (network, NULL, &res, &pgm_error)) { + struct pgm_transport_info_t hint; + memset (&hint, 0, sizeof (hint)); + hint.ti_family = AF_INET; + + if (!pgm_if_get_transport_info (network, &hint, &res, &pgm_error)) { if (pgm_error->domain == PGM_IF_ERROR && ( pgm_error->code == PGM_IF_ERROR_INVAL || -- cgit v1.2.3