-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem: zmq_connect with IPv6 "source:port;dest:port" format is broken #2107
Comments
Which version of libzmq? Which operating system and version? |
Also you can't both bind and connect the same socket |
Libzmq version - zeromq-4.1.4 OS - Linux Version 2.6.32-504.30.3.el6.x86_64 x86_64 |
But when I tried the same code with IPV4 address, its working fine. |
First of all, there was a new release and there were a couple ipv6 fixes, check 4.1.5. |
void* ctx= zmq_ctx_new(); I tried in zeromq-4.1.5 |
Correction : |
Yes I can reproduce the problem in a simple test, thanks for the report. I can have a look early next week as I'm travelling this weekend. |
Found the issue : for zmq_connect with source ipv6addr:port _while (isalnum (_check) |
Yes I found that, unfortunately there's bigger problems than that, bouncing messages with multiple connects seems broken as well, I'll dig deeper on Monday |
Ah, a silly oversight! Went back and checked again, and the ";" delimiter is to separate source and destination addresses when connecting, not for multiple endpoints: http://api.zeromq.org/4-1:zmq-tcp For multiple endpoints simply do multiple zmq_connect calls. That said, the source;dest is indeed broken with IPv6, will send a PR to fix it. |
Yeah dts wt I told you, for zmq_connect with sourceIp:port and On 17-Sep-2016 11:40 pm, "Luca Boccassi" notifications@github.com wrote:
|
Following is the snippet of code :
void* ctx= zmq_ctx_new();
void* socket =zmq_socket(ctx,ZMQ_DEALER);
int opt = 1;
zmq_setsockopt(socket, ZMQ_IPV6, &opt, sizeof(int));
int rc1=zmq_bind(socket,"tcp://[::ffff:127.0.0.1]:5559");
assert(rc1==0);
rc1=zmq_connect(socket,"tcp://[::ffff:127.0.0.1:5552];[::ffff:127.0.0.1]:5558");
assert(rc1==0);
zmq_close(socket);
zmq_ctx_destroy(ctx);
output :
int main(): Assertion `rc1==0' failed.
Aborted (core dumped)
Can u tell why it's happening? With IPV4 addresses its working fine.
The text was updated successfully, but these errors were encountered: