From 9700f30c35087dd0fdcd5a7e2ef91c4e1a847c59 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Wed, 26 Nov 2014 16:18:37 +0000 Subject: [PATCH] Tunnels: Disallow changing allowZeroHop setting for exploratory --- router/java/src/net/i2p/router/TunnelPoolSettings.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/router/java/src/net/i2p/router/TunnelPoolSettings.java b/router/java/src/net/i2p/router/TunnelPoolSettings.java index 481836d17e..fd718e4799 100644 --- a/router/java/src/net/i2p/router/TunnelPoolSettings.java +++ b/router/java/src/net/i2p/router/TunnelPoolSettings.java @@ -244,9 +244,10 @@ public class TunnelPoolSettings { String name = (String) e.getKey(); String value = (String) e.getValue(); if (name.startsWith(prefix)) { - if (name.equalsIgnoreCase(prefix + PROP_ALLOW_ZERO_HOP)) - _allowZeroHop = getBoolean(value, DEFAULT_ALLOW_ZERO_HOP); - else if (name.equalsIgnoreCase(prefix + PROP_BACKUP_QUANTITY)) + if (name.equalsIgnoreCase(prefix + PROP_ALLOW_ZERO_HOP)) { + if (!_isExploratory) + _allowZeroHop = getBoolean(value, DEFAULT_ALLOW_ZERO_HOP); + } else if (name.equalsIgnoreCase(prefix + PROP_BACKUP_QUANTITY)) _backupQuantity = getInt(value, DEFAULT_BACKUP_QUANTITY); //else if (name.equalsIgnoreCase(prefix + PROP_DURATION)) // _duration = getInt(value, DEFAULT_DURATION); -- GitLab