Skip to content

Commit

Permalink
An unaddressable egress packet should not be a reportable error.
Browse files Browse the repository at this point in the history
whitequark committed Sep 1, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent dc94c35 commit 3fff475
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/iface/ethernet.rs
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 3fff475

Please sign in to comment.