mirror of
https://github.com/arampoire/onetun.git
synced 2026-01-16 12:00:24 -05:00
chore: udpate to smoltcp 0.12
This commit is contained in:
parent
ca3590a4c0
commit
0e93a6435a
6 changed files with 13 additions and 11 deletions
|
|
@ -6,6 +6,7 @@ use crate::Bus;
|
|||
use anyhow::Context;
|
||||
use async_trait::async_trait;
|
||||
use bytes::Bytes;
|
||||
use smoltcp::iface::PollResult;
|
||||
use smoltcp::{
|
||||
iface::{Config, Interface, SocketHandle, SocketSet},
|
||||
socket::tcp,
|
||||
|
|
@ -141,7 +142,7 @@ impl VirtualInterfacePoll for TcpVirtualInterface {
|
|||
}
|
||||
});
|
||||
|
||||
if iface.poll(loop_start, &mut device, &mut self.sockets) {
|
||||
if iface.poll(loop_start, &mut device, &mut self.sockets) == PollResult::SocketStateChanged {
|
||||
log::trace!("TCP virtual interface polled some packets to be processed");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use crate::{Bus, PortProtocol};
|
|||
use anyhow::Context;
|
||||
use async_trait::async_trait;
|
||||
use bytes::Bytes;
|
||||
use smoltcp::iface::PollResult;
|
||||
use smoltcp::{
|
||||
iface::{Config, Interface, SocketHandle, SocketSet},
|
||||
socket::udp::{self, UdpMetadata},
|
||||
|
|
@ -140,7 +141,7 @@ impl VirtualInterfacePoll for UdpVirtualInterface {
|
|||
} => {
|
||||
let loop_start = smoltcp::time::Instant::now();
|
||||
|
||||
if iface.poll(loop_start, &mut device, &mut self.sockets) {
|
||||
if iface.poll(loop_start, &mut device, &mut self.sockets) == PollResult::SocketStateChanged {
|
||||
log::trace!("UDP virtual interface polled some packets to be processed");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue