Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
64732aec
Commit
64732aec
authored
Mar 26, 2012
by
Ian Barber
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #293 from hurtonm/fix_getaddrinfo_for_ipv6_on_freebsd
Don't set the AI_V4MAPPED flag on FreeBSD
parents
dc4d61f3
c2e9997a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
tcp_address.cpp
src/tcp_address.cpp
+13
-10
No files found.
src/tcp_address.cpp
View file @
64732aec
...
@@ -277,11 +277,12 @@ int zmq::tcp_address_t::resolve_interface (char const *interface_,
...
@@ -277,11 +277,12 @@ int zmq::tcp_address_t::resolve_interface (char const *interface_,
// service-name irregularity due to indeterminate socktype.
// service-name irregularity due to indeterminate socktype.
req
.
ai_flags
=
AI_PASSIVE
|
AI_NUMERICHOST
;
req
.
ai_flags
=
AI_PASSIVE
|
AI_NUMERICHOST
;
#ifndef ZMQ_HAVE_WINDOWS
#if defined AI_V4MAPPED && !defined ZMQ_HAVE_FREEBSD
// Windows by default maps IPv4 addresses into IPv6. In this API we only
// In this API we only require IPv4-mapped addresses when
// require IPv4-mapped addresses when no native IPv6 interfaces are
// no native IPv6 interfaces are available (~AI_ALL).
// available (~AI_ALL). This saves an additional DNS roundtrip for IPv4
// This saves an additional DNS roundtrip for IPv4 addresses.
// addresses.
// Note: While the AI_V4MAPPED flag is defined on FreeBSD system,
// it is not supported here. See libzmq issue #331.
if
(
req
.
ai_family
==
AF_INET6
)
if
(
req
.
ai_family
==
AF_INET6
)
req
.
ai_flags
|=
AI_V4MAPPED
;
req
.
ai_flags
|=
AI_V4MAPPED
;
#endif
#endif
...
@@ -322,11 +323,13 @@ int zmq::tcp_address_t::resolve_hostname (const char *hostname_, bool ipv4only_)
...
@@ -322,11 +323,13 @@ int zmq::tcp_address_t::resolve_hostname (const char *hostname_, bool ipv4only_)
// 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
;
#ifndef ZMQ_HAVE_WINDOWS
#if defined AI_V4MAPPED && !defined ZMQ_HAVE_FREEBSD
// Windows by default maps IPv4 addresses into IPv6. In this API we only
// In this API we only require IPv4-mapped addresses when
// require IPv4-mapped addresses when no native IPv6 interfaces are
// no native IPv6 interfaces are available.
// available. This saves an additional DNS roundtrip for IPv4 addresses.
// This saves an additional DNS roundtrip for IPv4 addresses.
// Note: While the AI_V4MAPPED flag is defined on FreeBSD system,
// it is not supported here. See libzmq issue #331.
if
(
req
.
ai_family
==
AF_INET6
)
if
(
req
.
ai_family
==
AF_INET6
)
req
.
ai_flags
|=
AI_V4MAPPED
;
req
.
ai_flags
|=
AI_V4MAPPED
;
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment