Skip to content

Commit 18cb7ca

Browse files
committed
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.
1 parent 78dafe5 commit 18cb7ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/socket_base.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ int zmq::socket_base_t::connect (const char *addr_)
842842
// Following code is quick and dirty check to catch obvious errors,
843843
// without trying to be fully accurate.
844844
const char *check = address.c_str ();
845-
if (isalnum (*check) || isxdigit (*check) || *check == '[') {
845+
if (isalnum (*check) || isxdigit (*check) || *check == '[' || *check == ':') {
846846
check++;
847847
while (isalnum (*check)
848848
|| isxdigit (*check)

0 commit comments

Comments
 (0)