forked from I2P_Developers/i2p.i2p
SSU: Reduce log level on packet size error (ticket #2675)
This commit is contained in:
@ -550,11 +550,14 @@ class PacketBuilder {
|
|||||||
authenticate(packet, peer.getCurrentCipherKey(), peer.getCurrentMACKey());
|
authenticate(packet, peer.getCurrentCipherKey(), peer.getCurrentMACKey());
|
||||||
setTo(packet, peer.getRemoteIPAddress(), peer.getRemotePort());
|
setTo(packet, peer.getRemoteIPAddress(), peer.getRemotePort());
|
||||||
|
|
||||||
|
// FIXME ticket #2675
|
||||||
// the packet could have been built before the current mtu got lowered, so
|
// the packet could have been built before the current mtu got lowered, so
|
||||||
// compare to LARGE_MTU
|
// compare to LARGE_MTU
|
||||||
int maxMTU = peer.isIPv6() ? PeerState.MAX_IPV6_MTU : PeerState.LARGE_MTU;
|
// Also happens on switch between IPv4 and IPv6
|
||||||
if (off + (ipHeaderSize + UDP_HEADER_SIZE) > maxMTU) {
|
if (_log.shouldWarn()) {
|
||||||
_log.error("Size is " + off + " for " + packet +
|
int maxMTU = peer.isIPv6() ? PeerState.MAX_IPV6_MTU : PeerState.LARGE_MTU;
|
||||||
|
if (off + (ipHeaderSize + UDP_HEADER_SIZE) > maxMTU) {
|
||||||
|
_log.warn("Size is " + off + " for " + packet +
|
||||||
" data size " + dataSize +
|
" data size " + dataSize +
|
||||||
" pkt size " + (off + (ipHeaderSize + UDP_HEADER_SIZE)) +
|
" pkt size " + (off + (ipHeaderSize + UDP_HEADER_SIZE)) +
|
||||||
" MTU " + currentMTU +
|
" MTU " + currentMTU +
|
||||||
@ -563,6 +566,7 @@ class PacketBuilder {
|
|||||||
explicitToSend + " full acks included, " +
|
explicitToSend + " full acks included, " +
|
||||||
partialAcksToSend + " partial acks included, " +
|
partialAcksToSend + " partial acks included, " +
|
||||||
" Fragments: " + DataHelper.toString(fragments), new Exception());
|
" Fragments: " + DataHelper.toString(fragments), new Exception());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return packet;
|
return packet;
|
||||||
|
Reference in New Issue
Block a user