forked from I2P_Developers/i2p.i2p
SSU2: Don't attempt to connect to ourselves as an introducer
reported by drzed
This commit is contained in:
@@ -112,6 +112,8 @@ class OutboundEstablishState2 extends OutboundEstablishState implements SSU2Payl
|
||||
INTRO_STATE_FAILED,
|
||||
/** this peer is not an introducer */
|
||||
INTRO_STATE_INVALID,
|
||||
/** this peer is us */
|
||||
INTRO_STATE_US,
|
||||
/** we got an accept from Charlie via this introducer */
|
||||
INTRO_STATE_SUCCESS
|
||||
}
|
||||
@@ -184,6 +186,8 @@ class OutboundEstablishState2 extends OutboundEstablishState implements SSU2Payl
|
||||
long exp = addr.getIntroducerExpiration(i);
|
||||
if (exp != 0 && exp < _establishBegin)
|
||||
istate = IntroState.INTRO_STATE_EXPIRED;
|
||||
else if (h.equals(_context.routerHash()))
|
||||
istate = IntroState.INTRO_STATE_US;
|
||||
else if (_context.banlist().isBanlisted(h))
|
||||
istate = IntroState.INTRO_STATE_REJECTED;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user