Changeset 18e24ed
- Timestamp:
- Jul 23, 2018 8:50:42 PM (3 years ago)
- Branches:
- master
- Children:
- 2893cbb, fe41dec
- Parents:
- f554ca3
- Location:
- router/java/src/net/i2p/router
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
router/java/src/net/i2p/router/RouterVersion.java
rf554ca3 r18e24ed 19 19 public final static String ID = "Monotone"; 20 20 public final static String VERSION = CoreVersion.VERSION; 21 public final static long BUILD = 1 6;21 public final static long BUILD = 17; 22 22 23 23 /** for example "-test" */ -
router/java/src/net/i2p/router/transport/ntcp/InboundEstablishState.java
rf554ca3 r18e24ed 57 57 /** how long we expect _sz_aliceIdent_tsA_padding_aliceSig to be when its full */ 58 58 private int _sz_aliceIdent_tsA_padding_aliceSigSize; 59 60 private boolean _released; 59 61 60 62 //// NTCP2 things … … 519 521 if(ip != null) 520 522 _context.blocklist().add(ip); 521 fail("Peer is banlisted forever: " + aliceHash); 523 if (getVersion() < 2) 524 fail("Peer is banlisted forever: " + aliceHash); 525 else if (_log.shouldWarn()) 526 _log.warn("Peer is banlisted forever: " + aliceHash); 522 527 _msg3p2FailReason = NTCPConnection.REASON_BANNED; 523 528 return false; … … 545 550 _x("Excessive clock skew: {0}")); 546 551 _transport.setLastBadSkew(_peerSkew); 547 fail("Clocks too skewed (" + diff + " ms)", null, true); 552 if (getVersion() < 2) 553 fail("Clocks too skewed (" + diff + " ms)", null, true); 554 else if (_log.shouldWarn()) 555 _log.warn("Clocks too skewed (" + diff + " ms)"); 548 556 _msg3p2FailReason = NTCPConnection.REASON_SKEW; 549 557 return false; … … 785 793 NTCP2Payload.processPayload(_context, this, payload, 0, _msg3p2len - MAC_SIZE, true); 786 794 } catch (IOException ioe) { 787 fail("Bad msg 3 payload", ioe); 795 if (_log.shouldWarn()) 796 _log.warn("Bad msg 3 payload", ioe); 788 797 // probably payload frame/block problems 789 798 // setDataPhase() will send termination … … 791 800 _msg3p2FailReason = NTCPConnection.REASON_FRAMING; 792 801 } catch (DataFormatException dfe) { 793 fail("Bad msg 3 payload", dfe); 802 if (_log.shouldWarn()) 803 _log.warn("Bad msg 3 payload", dfe); 794 804 // probably RI problems 795 805 // setDataPhase() will send termination … … 799 809 } catch (I2NPMessageException ime) { 800 810 // shouldn't happen, no I2NP msgs in msg3p2 801 fail("Bad msg 3 payload", ime); 811 if (_log.shouldWarn()) 812 _log.warn("Bad msg 3 payload", ime); 802 813 // setDataPhase() will send termination 803 814 if (_msg3p2FailReason < 0) … … 859 870 860 871 /** 861 * KDF for NTCP2 data phase, 862 * then calls con.finishInboundEstablishment(), 863 * passing over the final keys and states to the con. 864 * 865 * This changes the state to VERIFIED. 872 * KDF for NTCP2 data phase. 873 * 874 * If _msg3p2FailReason is less than zero, 875 * this calls con.finishInboundEstablishment(), 876 * passing over the final keys and states to the con, 877 * and changes the state to VERIFIED. 878 * 879 * Otherwise, it calls con.failInboundEstablishment(), 880 * which will send a termination message, 881 * and changes the state to CORRUPT. 882 * 883 * If you don't call this, call fail(). 866 884 * 867 885 * @param buf possibly containing "extra" data for data phase … … 886 904 _log.warn("Failed msg3p2, code " + _msg3p2FailReason + " for " + this); 887 905 _con.failInboundEstablishment(sender, sip_ba, _msg3p2FailReason); 906 changeState(State.CORRUPT); 888 907 } else { 889 908 if (_log.shouldDebug()) { … … 1032 1051 @Override 1033 1052 protected void releaseBufs(boolean isVerified) { 1053 if (_released) 1054 return; 1055 _released = true; 1034 1056 super.releaseBufs(isVerified); 1035 1057 // Do not release _curEncrypted if verified, it is passed to
Note: See TracChangeset
for help on using the changeset viewer.