mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-24 12:53:15 +00:00
SSU: Possible fix for NPE in establisher
This commit is contained in:
1 parent
384e9118c6
commit
9041a2c69f
1 file changed
+11
-2
@@ -850,11 +850,20 @@ class EstablishmentManager {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Peer " + state + " sent us an invalid DH parameter", ippe);
|
||||
_inboundStates.remove(state.getRemoteHostId());
|
||||
state.fail();
|
||||
return;
|
||||
}
|
||||
_transport.send(_builder.buildSessionCreatedPacket(state,
|
||||
UDPPacket pkt = _builder.buildSessionCreatedPacket(state,
|
||||
_transport.getExternalPort(state.getSentIP().length == 16),
|
||||
_transport.getIntroKey()));
|
||||
_transport.getIntroKey());
|
||||
if (pkt == null) {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Peer " + state + " sent us an invalid IP?");
|
||||
_inboundStates.remove(state.getRemoteHostId());
|
||||
state.fail();
|
||||
return;
|
||||
}
|
||||
_transport.send(pkt);
|
||||
state.createdPacketSent();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user