On 12/28/2013 08:53 AM, Pieter Hintjens wrote: > On Fri, Dec 27, 2013 at 6:34 PM, Arnaud Loonstra <arn...@sphaero.org> wrote: > >> Now node B is discoverd through eth1. It will receive a HELLO message >> from Node A containing the ipaddress 192.168.1.10 however it should use >> 192.168.2.10 instead. The two nodes can't finish their handshake. > > Why do you think node B will get a broadcast packet containing > 192.168.1.10 as sender? Surely the broadcast happens on each interface > separately?
Because zbeacon passes the ipaddress on to the agent which the zyre_node uses: zbeacon:411 // Send our hostname back to API char hostname [INET_ADDRSTRLEN]; getnameinfo ((struct sockaddr *) &self->address, sizeof (self->address), hostname, INET_ADDRSTRLEN, NULL, 0, NI_NUMERICHOST); zstr_send (pipe, hostname); zyre_node.c:138 // Our own host endpoint is provided by the beacon self->host = zbeacon_hostname (self->beacon); It uses that ipaddress to put in the ZRE HELLO message zyre_node.c:305: // Handshake discovery by sending HELLO as first message zre_msg_t *msg = zre_msg_new (ZRE_MSG_HELLO); zre_msg_set_ipaddress (msg, self->host); Then when a node receives an HELLO message it wil get the ipaddress from the ZRE message to pass to require_peer zyre_node.c:408 if (zre_msg_id (msg) == ZRE_MSG_HELLO) { peer = zyre_node_require_peer (self, uuid, zre_msg_ipaddress (msg), zre_msg_mailbox (msg)); So it's using the ipaddress from the ZRE message to connect to. I'm just saying it would be more logical to use the source address of the message. But again I might be missing something. Rg, Arnaud -- w: http://www.sphaero.org t: http://twitter.com/sphaero g: http://github.com/sphaero i: freenode: sphaero_z25 _______________________________________________ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev