Commit bba36e6e authored by Martin Lucina's avatar Martin Lucina

Disable IPv6 support

The current IPv6 support is half-assed and breaks for too many people.
Revert back to IPv4 only for now.
parent 39b89619
...@@ -232,8 +232,8 @@ int zmq::resolve_ip_interface (sockaddr_storage* addr_, socklen_t *addr_len_, ...@@ -232,8 +232,8 @@ int zmq::resolve_ip_interface (sockaddr_storage* addr_, socklen_t *addr_len_,
addrinfo req; addrinfo req;
memset (&req, 0, sizeof (req)); memset (&req, 0, sizeof (req));
// We don't care about family. IPv4 is as good as IPv6. // We only support IPv4 addresses for now.
req.ai_family = AF_UNSPEC; req.ai_family = AF_INET;
// Arbitrary, not used in the output, but avoids duplicate results. // Arbitrary, not used in the output, but avoids duplicate results.
req.ai_socktype = SOCK_STREAM; req.ai_socktype = SOCK_STREAM;
...@@ -280,15 +280,17 @@ int zmq::resolve_ip_hostname (sockaddr_storage *addr_, socklen_t *addr_len_, ...@@ -280,15 +280,17 @@ int zmq::resolve_ip_hostname (sockaddr_storage *addr_, socklen_t *addr_len_,
addrinfo req; addrinfo req;
memset (&req, 0, sizeof (req)); memset (&req, 0, sizeof (req));
// Don't specify the family. We want both IPv4 and IPv6. // We only support IPv4 addresses for now.
req.ai_family = AF_UNSPEC; req.ai_family = AF_INET;
// Need to choose one to avoid duplicate results from getaddrinfo() - this // Need to choose one to avoid duplicate results from getaddrinfo() - this
// doesn't really matter, since it's not included in the addr-output. // doesn't really matter, since it's not included in the addr-output.
req.ai_socktype = SOCK_STREAM; req.ai_socktype = SOCK_STREAM;
// Avoid named services due to unclear socktype, and don't pick IPv6 // Avoid named services due to unclear socktype, and don't pick IPv4
// addresses if we don't have a local IPv6 address configured. // addresses if we don't have a local IPv4 address configured.
// If this is failing for you on a host with only IPv6 connectivity,
// please contribute proper IPv6 support for all functions in this file.
req.ai_flags = AI_NUMERICSERV | AI_ADDRCONFIG; req.ai_flags = AI_NUMERICSERV | AI_ADDRCONFIG;
// Resolve host name. Some of the error info is lost in case of error, // Resolve host name. Some of the error info is lost in case of error,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment