Преглед на файлове

An unaddressable egress packet should not be a reportable error.

whitequark преди 7 години
родител
ревизия
3fff475c8f
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      src/iface/ethernet.rs

+ 3 - 2
src/iface/ethernet.rs

@@ -184,8 +184,9 @@ impl<'a, 'b, 'c, DeviceT: Device + 'a> Interface<'a, 'b, 'c, DeviceT> {
                     &mut Socket::__Nonexhaustive => unreachable!()
                 };
             match (device_result, socket_result) {
-                (Err(Error::Exhausted), Ok(())) => break, // nowhere to transmit
-                (Ok(()), Err(Error::Exhausted)) => (), // nothing to transmit
+                (Err(Error::Unaddressable), _) => break, // no one to transmit to
+                (Err(Error::Exhausted), _) => break,     // nowhere to transmit
+                (Ok(()), Err(Error::Exhausted)) => (),   // nothing to transmit
                 (Err(err), _) | (_, Err(err)) => {
                     net_debug!("cannot dispatch egress packet: {}", err);
                     return Err(err)