mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-23 19:48:19 +00:00
udp: don't log EMSGSIZE errors
These are occasionally expected now that we're generating MTU probes, and have been observed to cause unnecessary concern from users.
This commit is contained in:
+10
-2
@@ -292,7 +292,11 @@ fn send(
|
||||
// Those are not fatal errors, since the
|
||||
// configuration can be dynamically changed.
|
||||
// - Destination unreachable errors have been observed for other
|
||||
log_sendmsg_error(&state.last_send_error, e, &transmits[0]);
|
||||
// - EMSGSIZE is expected for MTU probes. Future work might be able to avoid
|
||||
// these by automatically clamping the MTUD upper bound to the interface MTU.
|
||||
if e.raw_os_error() != Some(libc::EMSGSIZE) {
|
||||
log_sendmsg_error(&state.last_send_error, e, &transmits[0]);
|
||||
}
|
||||
|
||||
// The ERRORS section in https://man7.org/linux/man-pages/man2/sendmmsg.2.html
|
||||
// describes that errors will only be returned if no message could be transmitted
|
||||
@@ -341,7 +345,11 @@ fn send(state: &UdpSocketState, io: SockRef<'_>, transmits: &[Transmit]) -> io::
|
||||
// Those are not fatal errors, since the
|
||||
// configuration can be dynamically changed.
|
||||
// - Destination unreachable errors have been observed for other
|
||||
log_sendmsg_error(&state.last_send_error, e, &transmits[sent]);
|
||||
// - EMSGSIZE is expected for MTU probes. Future work might be able to avoid
|
||||
// these by automatically clamping the MTUD upper bound to the interface MTU.
|
||||
if e.raw_os_error() != Some(libc::EMSGSIZE) {
|
||||
log_sendmsg_error(&state.last_send_error, e, &transmits[sent]);
|
||||
}
|
||||
sent += 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user