diff --git a/leaf/src/common/cmd_linux.rs b/leaf/src/common/cmd_linux.rs index 83281eb..cc9b769 100644 --- a/leaf/src/common/cmd_linux.rs +++ b/leaf/src/common/cmd_linux.rs @@ -113,7 +113,7 @@ pub fn get_default_interface() -> Result { pub fn add_interface_ipv4_address( name: &str, addr: Ipv4Addr, - gw: Ipv4Addr, + _gw: Ipv4Addr, mask: Ipv4Addr, ) -> Result<()> { Command::new("ip") diff --git a/leaf/src/proxy/mod.rs b/leaf/src/proxy/mod.rs index fa2db33..42ca5eb 100644 --- a/leaf/src/proxy/mod.rs +++ b/leaf/src/proxy/mod.rs @@ -191,7 +191,7 @@ impl TcpListener { pub async fn accept(&self) -> io::Result<(TcpStream, SocketAddr)> { let (stream, addr) = self.inner.accept().await?; apply_socket_opts(&stream)?; - stream.set_linger(Some(Duration::ZERO))?; + SockRef::from(&stream).set_linger(Some(Duration::ZERO))?; Ok((stream, addr)) } }