mirror of
https://github.com/jgoerzen/xbnet.git
synced 2025-01-03 12:08:21 -04:00
reduce debugging
This commit is contained in:
parent
f4a71fd32c
commit
e89f5f17e2
@ -74,25 +74,20 @@ impl XBTun {
|
||||
}
|
||||
|
||||
pub fn get_xb_dest_mac(&self, ipaddr: &IpAddr) -> u64 {
|
||||
trace!("Looking up destination for {}", ipaddr);
|
||||
if self.broadcast_everything {
|
||||
trace!("broadcast_everything is on, so broadcast");
|
||||
return XB_BROADCAST;
|
||||
}
|
||||
|
||||
match self.dests.lock().unwrap().get(ipaddr) {
|
||||
// Broadcast if we don't know it
|
||||
None => {
|
||||
trace!("Destination not in map");
|
||||
XB_BROADCAST
|
||||
},
|
||||
Some((dest, expiration)) => {
|
||||
if Instant::now() >= *expiration {
|
||||
// Broadcast it if the cache entry has expired
|
||||
trace!("Destination expired");
|
||||
XB_BROADCAST
|
||||
} else {
|
||||
trace!("Destination {} found", dest);
|
||||
*dest
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user