network: move entry creation logging to NAT itself

This commit is contained in:
Alex Zenla
2024-02-10 14:30:41 +00:00
parent 6913e837f8
commit a7f4e0a549
2 changed files with 3 additions and 4 deletions

View File

@ -254,6 +254,7 @@ impl NatRouter {
.nat(key, self.tx_sender.clone(), self.reclaim_sender.clone())
.await
{
debug!("creating nat entry for key: {}", key);
Some(entry.insert(handler))
} else {
None

View File

@ -1,6 +1,6 @@
use async_trait::async_trait;
use log::{debug, warn};
use log::warn;
use tokio::sync::mpsc::channel;
use tokio::sync::mpsc::Sender;
@ -27,8 +27,6 @@ impl NatHandlerFactory for ProxyNatHandlerFactory {
tx_sender: Sender<Vec<u8>>,
reclaim_sender: Sender<NatKey>,
) -> Option<Box<dyn NatHandler>> {
debug!("creating proxy nat entry for key: {}", key);
match key.protocol {
NatKeyProtocol::Udp => {
let (rx_sender, rx_receiver) = channel::<Vec<u8>>(4);
@ -47,7 +45,7 @@ impl NatHandlerFactory for ProxyNatHandlerFactory {
}
}
pub enum ProxyNatSelect {
pub(crate) enum ProxyNatSelect {
External(usize),
Internal(Vec<u8>),
Close,