From c1dc3c827502103c29b5d5c53018629416a23c3c Mon Sep 17 00:00:00 2001
From: zzz <zzz@i2pmail.org>
Date: Tue, 25 Jan 2022 09:37:26 -0500
Subject: [PATCH] Data: Remove dup check for negative tunnel ID

---
 core/java/src/net/i2p/data/TunnelId.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/core/java/src/net/i2p/data/TunnelId.java b/core/java/src/net/i2p/data/TunnelId.java
index bdb2dec685..ac753fc3a5 100644
--- a/core/java/src/net/i2p/data/TunnelId.java
+++ b/core/java/src/net/i2p/data/TunnelId.java
@@ -64,7 +64,8 @@ public class TunnelId {
     }
     
     public void writeBytes(OutputStream out) throws DataFormatException, IOException {
-        if (_tunnelId < 0) throw new DataFormatException("Invalid tunnel ID: " + _tunnelId);
+        // writeLong() will throw DFE on negative value
+        //if (_tunnelId < 0) throw new DataFormatException("Invalid tunnel ID: " + _tunnelId);
         DataHelper.writeLong(out, 4, _tunnelId);
     }
 
-- 
GitLab