mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-12 23:43:44 +02:00
debug code removal and comments
This commit is contained in:
parent
eaacb26187
commit
80151f0dc7
1 changed files with 34 additions and 34 deletions
|
@ -645,6 +645,8 @@ impl<HostSystemImpl: HostSystem> Node<HostSystemImpl> {
|
|||
// Legacy ZeroTier V1 packet handling
|
||||
if let Ok(fragment_header) = data.struct_mut_at::<v1::FragmentHeader>(0) {
|
||||
if let Some(dest) = Address::from_bytes_fixed(&fragment_header.dest) {
|
||||
// Packet is addressed to this node.
|
||||
|
||||
if dest == self.identity.address {
|
||||
let fragment_header = &*fragment_header; // discard mut
|
||||
let path = self.canonical_path(source_endpoint, source_local_socket, source_local_interface, time_ticks);
|
||||
|
@ -706,8 +708,7 @@ impl<HostSystemImpl: HostSystem> Node<HostSystemImpl> {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if let Ok(packet_header) = data.struct_at::<v1::PacketHeader>(0) {
|
||||
} else if let Ok(packet_header) = data.struct_at::<v1::PacketHeader>(0) {
|
||||
debug_event!(
|
||||
host_system,
|
||||
"[vl1] [v1] #{:0>16x} is unfragmented",
|
||||
|
@ -722,8 +723,9 @@ impl<HostSystemImpl: HostSystem> Node<HostSystemImpl> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Packet is addressed somewhere else.
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
let debug_packet_id;
|
||||
|
||||
|
@ -743,8 +745,7 @@ impl<HostSystemImpl: HostSystem> Node<HostSystemImpl> {
|
|||
debug_event!(host_system, "[vl1] [v1] #{:0>16x} discarded: max hops exceeded!", debug_packet_id);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if let Ok(packet_header) = data.struct_mut_at::<v1::PacketHeader>(0) {
|
||||
} else if let Ok(packet_header) = data.struct_mut_at::<v1::PacketHeader>(0) {
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
debug_packet_id = u64::from_be_bytes(packet_header.id);
|
||||
|
@ -767,7 +768,6 @@ impl<HostSystemImpl: HostSystem> Node<HostSystemImpl> {
|
|||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(peer) = self.peer(dest) {
|
||||
// TODO: SHOULD we forward? Need a way to check.
|
||||
|
|
Loading…
Add table
Reference in a new issue