Opened 3 years ago

Closed 3 years ago

#1819 closed defect (fixed)

IPv6 Peer testing gets stuck when running IPv6-only

Reported by: Obscuratus Owned by: zzz
Priority: minor Milestone: 0.9.27
Component: router/transport Version: 0.9.26
Keywords: Cc:
Parent Tickets:

Description

This bug is in the context of IPv6 peer testing recently added in >=0.9.26-3.

When running in IPv6-only mode, peer testing becomes stuck attempting to perform an IPv4 peer test. The IPv4 peer test will abort when pickTestPeer fails to find an IPv4 peer due to lack of any incoming IPv4 connections, and will continue to attempt IPv4 testing on successive runs of peer testing since there's never been a successful IPv4 test.

The following one-line patch fixed the problem for me.

From 8353934e88b0632c5ffb8fd1a143087d3d08451e Mon Sep 17 00:00:00 2001
From: obscuratus <obscuratus@mail.i2p>
Date: Thu, 28 Jul 2016 11:07:06 -0500
Subject: [PATCH] i2p/router: Check for IPV6_ONLY before checking IPv4
 Reachability

I2P allows an IPv6-only mode.

IPv6 peer testing has been added recently; however, when running
in IPv6-only, periodic peer testing will get stuck trying to test
for IPv4 reachability.

Add a test to skip IPv4 periodic peer testing if the router is
configured as IPV6_ONLY.

Signed-off-by: obscuratus <obscuratus@mail.i2p>
---
 router/java/src/net/i2p/router/transport/udp/UDPTransport.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java
index 917bd41..01caaae 100644
--- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java
+++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java
@@ -3303,7 +3303,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
                     locked_runTest(false);
                 } else if (_haveIPv6Address &&_forceRun == FORCE_IPV6 && sinceRunV6 >= MIN_TEST_FREQUENCY) {
                     locked_runTest(true);
-                } else if (sinceRunV4 >= TEST_FREQUENCY) {
+                } else if (sinceRunV4 >= TEST_FREQUENCY && (getIPv6Config() != IPV6_ONLY)) {
                     locked_runTest(false);
                 } else if (_haveIPv6Address && sinceRunV6 >= TEST_FREQUENCY) {
                     locked_runTest(true);
-- 
2.7.3

Subtickets

Change History (1)

comment:1 Changed 3 years ago by zzz

  • Milestone changed from undecided to 0.9.27
  • Resolution set to fixed
  • Status changed from new to closed

Applied in 25287b7cddc8b88c593415ef588b6332e7dbb1cc 0.9.26-8

There's probably more IPv6-only bugs floating around, thanks for testing

Note: See TracTickets for help on using tickets.