I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit 75492514 authored by zzz's avatar zzz
Browse files

SSU: Fix packet-too-large check in UDPSender

parent e43810f1
No related branches found
No related tags found
No related merge requests found
......@@ -193,7 +193,8 @@ class UDPSender {
public void add(UDPPacket packet) {
if (packet == null || !_keepRunning) return;
int psz = packet.getPacket().getLength();
if (psz > PeerState2.MAX_MTU) {
// minus IP header and UDP header, assume IPv4, this is just a quick check
if (psz > PeerState2.MAX_MTU - 28) {
_log.error("Dropping large UDP packet " + psz + " bytes: " + packet, new Exception());
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment