From f0f285ae63fd6103b0d0b8c84e64736b7926fe20 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 14 Oct 2008 04:56:42 +0000 Subject: [PATCH] fixed bug where broadcast socket would not send messages on interfaces with addresses in local network ranges --- src/broadcast_socket.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/broadcast_socket.cpp b/src/broadcast_socket.cpp index deefe23be..43654a11a 100644 --- a/src/broadcast_socket.cpp +++ b/src/broadcast_socket.cpp @@ -169,15 +169,13 @@ namespace libtorrent for (std::vector::const_iterator i = interfaces.begin() , end(interfaces.end()); i != end; ++i) { - // only broadcast to IPv4 addresses that are not local - if (is_local(i->interface_address)) continue; // only multicast on compatible networks if (i->interface_address.is_v4() != multicast_endpoint.address().is_v4()) continue; // ignore any loopback interface if (is_loopback(i->interface_address)) continue; #ifndef NDEBUG -// std::cerr << "broadcast socket [ if: " << i->to_v4().to_string() +// std::cerr << "broadcast socket [ if: " << i->interface_address.to_v4().to_string() // << " group: " << multicast_endpoint.address() << " ]" << std::endl; #endif open_unicast_socket(ios, i->interface_address);