diff --git a/netstack/src/link/ethernet.rs b/netstack/src/link/ethernet.rs index c10f504552..d53ea1849d 100644 --- a/netstack/src/link/ethernet.rs +++ b/netstack/src/link/ethernet.rs @@ -156,6 +156,7 @@ impl EthernetLink { f(frame.payload_mut()); if let Err(_) = self.network_file.write_all(&self.output_buffer) { + self.stats.tx_errors += 1; error!( "Dropped outboud packet on {} (failed to write to network file)", self.name @@ -175,6 +176,7 @@ impl EthernetLink { let Ok(repr) = ArpPacket::new_checked(packet).and_then(|packet| ArpRepr::parse(&packet)) else { debug!("Dropped incomming arp packet on {} (Malformed)", self.name); + self.stats.rx_errors += 1; return; }; @@ -787,6 +789,7 @@ impl LinkDevice for EthernetLink { let packet = EthernetFrame::new_unchecked(&input_buffer[..]); let Ok(repr) = EthernetRepr::parse(&packet) else { debug!("Dropped incomming frame on {} (Malformed)", self.name); + self.stats.rx_errors += 1; continue; };