simplify packet definition (#30)

This commit is contained in:
Sijie.Sun
2024-03-13 18:09:48 +08:00
committed by GitHub
parent 0053666dfb
commit b0494687b5
9 changed files with 26 additions and 52 deletions
+1 -1
View File
@@ -246,7 +246,7 @@ impl PeerPacketFilter for UdpProxy {
return None;
};
let ipv4 = Ipv4Packet::new(&x.data)?;
let ipv4 = Ipv4Packet::new(&x)?;
if ipv4.get_version() != 4 || ipv4.get_next_level_protocol() != IpNextHeaderProtocols::Udp {
return None;