diff --git a/src/kademlia/dht_tracker.cpp b/src/kademlia/dht_tracker.cpp index 3d033d11f..97f9064c5 100644 --- a/src/kademlia/dht_tracker.cpp +++ b/src/kademlia/dht_tracker.cpp @@ -641,8 +641,11 @@ namespace libtorrent { namespace dht catch (std::exception& e) { #ifdef TORRENT_DHT_VERBOSE_LOGGING + int current_buffer = (m_buffer + 1) & 1; + std::string msg(m_in_buf[current_buffer].begin() + , m_in_buf[current_buffer].end()); TORRENT_LOG(dht_tracker) << "invalid incoming packet: " - << e.what(); + << e.what() << "\n" << msg.c_str() << "\n"; #endif } } diff --git a/src/kademlia/rpc_manager.cpp b/src/kademlia/rpc_manager.cpp index 985cb7ae6..043981fcb 100644 --- a/src/kademlia/rpc_manager.cpp +++ b/src/kademlia/rpc_manager.cpp @@ -117,7 +117,7 @@ bool rpc_manager::incoming(msg const& m) // if we don't have the transaction id in our // request list, ignore the packet - if (m.transaction_id.size() != 2) + if (m.transaction_id.size() < 2) { #ifdef TORRENT_DHT_VERBOSE_LOGGING TORRENT_LOG(rpc) << "Reply with invalid transaction id size: "