forked from I2P_Developers/i2p.i2p
SSU: Fix packet-too-large check in UDPSender
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user