Fixes for validation of dial info

This commit is contained in:
John Smith
2022-06-05 13:23:18 -04:00
parent cfcf430a99
commit 1eb26758e9
11 changed files with 112 additions and 46 deletions
+2 -2
View File
@@ -18,9 +18,9 @@ pub mod tests;
pub use network_connection::*;
////////////////////////////////////////////////////////////////////////////////////////
use connection_handle::*;
use connection_limits::*;
use connection_manager::*;
use connection_handle::*;
use dht::*;
use hashlink::LruCache;
use intf::*;
@@ -1048,7 +1048,7 @@ impl NetworkManager {
);
// Network accounting
self.stats_packet_rcvd(descriptor.remote.to_socket_addr().ip(), data.len() as u64);
self.stats_packet_rcvd(descriptor.remote_address().to_ip_addr(), data.len() as u64);
// Ensure we can read the magic number
if data.len() < 4 {