0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

Merge pull request #2332 from bluca/parse_v4_mapped_in_v6

Problem: v4-in-v6 mapped addresses cause parsing failure
This commit is contained in:
Luca Boccassi 2017-02-07 21:22:24 +00:00 committed by GitHub
commit 26998b738e

View File

@ -842,7 +842,7 @@ int zmq::socket_base_t::connect (const char *addr_)
// Following code is quick and dirty check to catch obvious errors,
// without trying to be fully accurate.
const char *check = address.c_str ();
if (isalnum (*check) || isxdigit (*check) || *check == '[') {
if (isalnum (*check) || isxdigit (*check) || *check == '[' || *check == ':') {
check++;
while (isalnum (*check)
|| isxdigit (*check)