From 18cb7caeb2467ed1b94c748ce6ae65a60884b951 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 3 Feb 2017 11:19:31 +0100 Subject: [PATCH] Problem: v4-in-v6 mapped addresses cause parsing failure Solution: in the address validator accept an endpoint that starts with :, eg: ::ffff:192.168.0.1:12345 as it's a valid mapped address. --- src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket_base.cpp b/src/socket_base.cpp index bf87241b..bd013f90 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -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)