diff --git a/src/network/tun_win.rs b/src/network/tun_win.rs index 7bd76cb..3d80001 100644 --- a/src/network/tun_win.rs +++ b/src/network/tun_win.rs @@ -15,7 +15,7 @@ use wintun; use crate::get_edge; use crate::network::{ generate_arp_request, send_arp_request, send_packet_to_net, ArpHdr, ArpRequestInfo, - ArpResponse, ARP_REPLY, + ArpResponse, ARP_REPLY, ARP_REQUEST, }; use crate::pb::{encode_to_udp_message, SdlData}; use crate::tcp::PacketType; @@ -102,7 +102,7 @@ impl TunTapPacketHandler for Iface { error!("payload length error"); return Ok(()); } - let crc_code = &rest[(rest.len() - 4)..rest.len()]; + // let crc_code = &rest[(rest.len() - 4)..rest.len()]; // let rest = &rest[..(rest.len() - 4)]; @@ -200,7 +200,7 @@ impl TunTapPacketHandler for Iface { .await; } } - other => { + _other => { println!("unknown arp type info"); } } @@ -217,7 +217,7 @@ impl TunTapPacketHandler for Iface { send_arp_request(ArpRequestInfo::Set { ip, mac }).await; } } - Err(e) => { + Err(_) => { error!("failed to parse ip header, dropping"); return Ok(()); }