Эх сурвалжийг харах

An unaddressable egress packet should not be a reportable error.

whitequark 7 жил өмнө
parent
commit
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)