Changeset 68d8c6e


Ignore:
Timestamp:
Jan 6, 2016 7:38:26 PM (5 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
3573928
Parents:
f85d0308
Message:

NetDB: Don't query floodfills if they are too old to
support sig types or encrypted replies (ticket #1742)

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    rf85d0308 r68d8c6e  
    44 * DataHelper: Optimize checks in storeProps()
    55 * I2PTunnel: Fixup console links in error pages if console is
    6            on a non-standard host or port, or on https
     6   on a non-standard host or port, or on https
    77 * Jetty: Change default source logging from b64 to b32.
    88   To change back to b64, add the following to the RequestLogImpl
    99   section of jetty.xml: <Set name="b64">true</Set>
     10 * NetDB: Don't query floodfills if they are too old to
     11   support sig types or encrypted replies (ticket #1742)
    1012 * PortMapper: Add method to convert wildcard host to actual host
    1113
  • router/java/src/net/i2p/router/RouterVersion.java

    rf85d0308 r68d8c6e  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 19;
     21    public final static long BUILD = 20;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/networkdb/kademlia/IterativeSearchJob.java

    rf85d0308 r68d8c6e  
    1111import java.util.concurrent.ConcurrentHashMap;
    1212
     13import net.i2p.crypto.SigType;
    1314import net.i2p.data.Base64;
    1415import net.i2p.data.DataHelper;
     
    3132import net.i2p.util.NativeBigInteger;
    3233import net.i2p.util.SystemVersion;
     34import net.i2p.util.VersionComparator;
    3335
    3436/**
     
    289291            TunnelManagerFacade tm = getContext().tunnelManager();
    290292            RouterInfo ri = getContext().netDb().lookupRouterInfoLocally(peer);
     293            if (ri != null) {
     294                // Now that most of the netdb is Ed RIs and EC LSs, don't even bother
     295                // querying old floodfills that don't know about those sig types.
     296                // This is also more recent than the version that supports encrypted replies,
     297                // so we won't request unencrypted replies anymore either.
     298                String v = ri.getVersion();
     299                String since = SigType.EdDSA_SHA512_Ed25519.getSupportedSince();
     300                if (VersionComparator.comp(v, since) < 0) {
     301                    failed(peer, false);
     302                    if (_log.shouldLog(Log.WARN))
     303                        _log.warn(getJobId() + ": not sending query to old version " + v + ": " + peer);
     304                    return;
     305                }
     306            }
    291307            TunnelInfo outTunnel;
    292308            TunnelInfo replyTunnel;
     
    382398                if (ri != null) {
    383399                    // request encrypted reply
    384                     if (DatabaseLookupMessage.supportsEncryptedReplies(ri)) {
     400                    // now covered by version check above, which is more recent
     401                    //if (DatabaseLookupMessage.supportsEncryptedReplies(ri)) {
     402                    if (true) {
    385403                        MessageWrapper.OneTimeSession sess;
    386404                        if (isClientReplyTunnel)
Note: See TracChangeset for help on using the changeset viewer.