NetDB: Use expl. tunnels to verify Meta LS2 (proposal #123)

This commit is contained in:
zzz
2019-05-10 17:33:39 +00:00
parent 0a7330393d
commit c1adcfcc19

View File

@@ -103,7 +103,8 @@ class FloodfillVerifyStoreJob extends JobImpl {
boolean isInboundExploratory; boolean isInboundExploratory;
TunnelInfo replyTunnelInfo; TunnelInfo replyTunnelInfo;
if (_isRouterInfo || getContext().keyRing().get(_key) != null) { if (_isRouterInfo || getContext().keyRing().get(_key) != null ||
_type == DatabaseEntry.KEY_TYPE_META_LS2) {
replyTunnelInfo = getContext().tunnelManager().selectInboundExploratoryTunnel(_target); replyTunnelInfo = getContext().tunnelManager().selectInboundExploratoryTunnel(_target);
isInboundExploratory = true; isInboundExploratory = true;
} else { } else {
@@ -122,10 +123,12 @@ class FloodfillVerifyStoreJob extends JobImpl {
// to avoid association by the exploratory tunnel OBEP. // to avoid association by the exploratory tunnel OBEP.
// Unless it is an encrypted leaseset. // Unless it is an encrypted leaseset.
TunnelInfo outTunnel; TunnelInfo outTunnel;
if (_isRouterInfo || getContext().keyRing().get(_key) != null) if (_isRouterInfo || getContext().keyRing().get(_key) != null ||
_type == DatabaseEntry.KEY_TYPE_META_LS2) {
outTunnel = getContext().tunnelManager().selectOutboundExploratoryTunnel(_target); outTunnel = getContext().tunnelManager().selectOutboundExploratoryTunnel(_target);
else } else {
outTunnel = getContext().tunnelManager().selectOutboundTunnel(_client, _target); outTunnel = getContext().tunnelManager().selectOutboundTunnel(_client, _target);
}
if (outTunnel == null) { if (outTunnel == null) {
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))
_log.warn("No outbound tunnels to verify a store"); _log.warn("No outbound tunnels to verify a store");