mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-22 19:24:08 +00:00
Drop truncated UDP packets
These would fail decryption anyway, so this saves us some CPU.
This commit is contained in:
committed by
Dirkjan Ochtman
parent
76875b7af5
commit
3f36be64af
@@ -151,6 +151,9 @@ impl super::UdpExt for UdpSocket {
|
||||
}
|
||||
return Err(e);
|
||||
}
|
||||
if hdr.msg_flags & libc::MSG_TRUNC != 0 {
|
||||
continue;
|
||||
}
|
||||
break n;
|
||||
};
|
||||
let name = unsafe { name.assume_init() };
|
||||
|
||||
Reference in New Issue
Block a user