Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/udp_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ void zmq::udp_engine_t::plug (io_thread_t *io_thread_, session_base_t *session_)
rc = rc | set_udp_reuse_address (_fd, true);

const ip_addr_t *bind_addr = udp_addr->bind_addr ();
ip_addr_t any = ip_addr_t::any (bind_addr->family ());
const ip_addr_t *real_bind_addr;

const bool multicast = udp_addr->is_mcast ();
Expand All @@ -143,11 +142,10 @@ void zmq::udp_engine_t::plug (io_thread_t *io_thread_, session_base_t *session_)
// one port as all ports should receive the message
rc = rc | set_udp_reuse_port (_fd, true);

// In multicast we should bind ANY and use the mreq struct to
// specify the interface
any.set_port (bind_addr->port ());
// In multicast we should bind the target address and use the
// mreq struct to specify the interface

real_bind_addr = &any;
real_bind_addr = udp_addr->target_addr ();
} else {
real_bind_addr = bind_addr;
}
Expand Down
Loading