This repository was archived by the owner on Nov 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +33
-314
lines changed
Expand file tree Collapse file tree 3 files changed +33
-314
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ fn csum_ic(packet: &mut xdp::Packet) -> u16 {
9090
9191 udp_hdr
9292 }
93- EtherType :: Arp => unreachable ! ( ) ,
93+ _ => unreachable ! ( ) ,
9494 } ;
9595
9696 udp_hdr. check = 0 ;
@@ -152,7 +152,7 @@ fn csum_ep(packet: &mut xdp::Packet) -> u16 {
152152 . unwrap ( )
153153 . to_be ( )
154154 }
155- EtherType :: Arp => unreachable ! ( ) ,
155+ _ => unreachable ! ( ) ,
156156 }
157157}
158158
Original file line number Diff line number Diff line change @@ -224,9 +224,9 @@ use crate::packet::net_types as nt;
224224#[ derive( Debug ) ]
225225pub enum UdpCalcError {
226226 /// Not an IP packet
227- NotIp ( nt:: EtherType ) ,
227+ NotIp ( nt:: EtherType :: Enum ) ,
228228 /// Not a UDP packet
229- NotUdp ( nt:: IpProto ) ,
229+ NotUdp ( nt:: IpProto :: Enum ) ,
230230 /// Packet data was invalid/corrupt
231231 Packet ( super :: PacketError ) ,
232232}
@@ -350,7 +350,7 @@ impl super::Packet {
350350 ( finalize ( sum) , udp_hdr)
351351 }
352352 }
353- EtherType :: Arp => return Err ( UdpCalcError :: NotIp ( EtherType :: Arp ) ) ,
353+ invalid => return Err ( UdpCalcError :: NotIp ( invalid ) ) ,
354354 } ;
355355
356356 let checksum = if self . can_offload_checksum ( ) {
You can’t perform that action at this time.
0 commit comments