An unaddressable egress packet should not be a reportable error.

This commit is contained in:
whitequark 2017-09-01 10:30:56 +00:00
parent f8edf0faea
commit 7db21529e5
1 changed files with 3 additions and 2 deletions

View File

@ -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)