Changeset 526aadb for router


Ignore:
Timestamp:
Aug 2, 2018 9:08:20 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
0b2ef3d
Parents:
8d629de2
Message:

NTCP2: Fix padding calculation for small frames

Location:
router/java/src/net/i2p/router
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/RouterVersion.java

    r8d629de2 r526aadb  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 20;
     21    public final static long BUILD = 21;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java

    r8d629de2 r526aadb  
    916916     */
    917917    private int getPaddingSize(int dataSize, int availForPad) {
     918        // since we're calculating with percentages, get at least a
     919        // 0-16 range with the default 0% min 6% max,
     920        // even for small dataSize.
     921        if (dataSize < 256)
     922            dataSize = 256;
    918923        // what we want to send, calculated in proportion to data size
    919924        int minSend = (int) (dataSize * _paddingConfig.getSendMin());
Note: See TracChangeset for help on using the changeset viewer.