Skip to content

Commit

Permalink
Merge pull request #866 from thvdveld/dont-process-empty-packets
Browse files Browse the repository at this point in the history
fix: don't handle empty packets
  • Loading branch information
thvdveld authored Dec 11, 2023
2 parents 48cb672 + f74c5f0 commit 4700f2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/iface/interface/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,10 @@ impl Interface {
while let Some((rx_token, tx_token)) = device.receive(self.inner.now) {
let rx_meta = rx_token.meta();
rx_token.consume(|frame| {
if frame.is_empty() {
return;
}

match self.inner.caps.medium {
#[cfg(feature = "medium-ethernet")]
Medium::Ethernet => {
Expand Down

0 comments on commit 4700f2a

Please sign in to comment.