Changeset ea127d3


Ignore:
Timestamp:
Mar 27, 2019 1:58:56 PM (20 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ba801be
Parents:
82eea0a
Message:

NetDB: Fix b33 lookup looping after failure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/client/LookupDestJob.java

    r82eea0a rea127d3  
    105105                            if (_log.shouldWarn())
    106106                                _log.debug("Failed blinding conversion of " + name, re);
    107                             // lookup as a name, which will probably fail
     107                            // Do NOT lookup as a name, naming service will call us again and infinite loop
     108                            name = null;
     109                            // h and name both null, runJob will fail immediately
    108110                        }
    109111                    }
     
    143145                returnFail();
    144146            }
    145         } else {
     147        } else if (_hash != null) {
    146148            DoneJob done = new DoneJob(getContext());
    147149            // TODO tell router this is an encrypted lookup, skip 38 or earlier ffs?
    148150            getContext().netDb().lookupDestination(_hash, done, _timeout, _fromLocalDest);
     151        } else {
     152            // blinding decode fail
     153            returnFail();
    149154        }
    150155    }
     
    200205        if (_reqID >= 0)
    201206            msg = new HostReplyMessage(_sessID, HostReplyMessage.RESULT_FAILURE, _reqID);
     207        else if (_hash != null)
     208            msg = new DestReplyMessage(_hash);
    202209        else
    203             msg = new DestReplyMessage(_hash);
     210            return; // shouldn't happen
    204211        try {
    205212            _runner.doSend(msg);
Note: See TracChangeset for help on using the changeset viewer.