smoltcp version 0.10 applied

This commit is contained in:
ssrlive 2023-10-21 11:12:18 +08:00 committed by Aram Peres
parent ae15b4203c
commit 38fc217a29
6 changed files with 296 additions and 123 deletions

View file

@ -237,7 +237,7 @@ impl WireGuardTunnel {
.ok()
// Only care if the packet is destined for this tunnel
.filter(|packet| Ipv4Addr::from(packet.dst_addr()) == self.source_peer_ip)
.and_then(|packet| match packet.protocol() {
.and_then(|packet| match packet.next_header() {
IpProtocol::Tcp => Some(PortProtocol::Tcp),
IpProtocol::Udp => Some(PortProtocol::Udp),
// Unrecognized protocol, so we cannot determine where to route