I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit 32d60858 authored by zzz's avatar zzz
Browse files

NTCP: Start out reachable if SSU disabled

So peers will attempt to connect
parent be4ad7eb
No related branches found
No related tags found
No related merge requests found
......@@ -852,6 +852,7 @@ public class NTCPTransport extends TransportImpl {
boolean isFixedOrForceFirewalled = _context.getProperty(PROP_I2NP_NTCP_AUTO_IP, "true")
.toLowerCase(Locale.US).equals("false");
RouterAddress myAddress = bindAddress(port);
boolean ssuDisabled = !_context.getBooleanPropertyDefaultTrue(TransportManager.PROP_ENABLE_UDP);
if (myAddress != null) {
// fixed interface, or bound to the specified host
replaceAddress(myAddress);
......@@ -867,7 +868,7 @@ public class NTCPTransport extends TransportImpl {
boolean skipv6 = false;
for (InetAddress ia : addrs) {
boolean ipv6 = ia instanceof Inet6Address;
if ((ipv6 && (isIPv6Firewalled() || _context.getBooleanProperty(PROP_IPV6_FIREWALLED))) ||
if ((ipv6 && (isIPv6Firewalled() || (_context.getBooleanProperty(PROP_IPV6_FIREWALLED) && !ssuDisabled))) ||
(!ipv6 && isIPv4Firewalled())) {
if (ipv6)
skipv6 = true;
......@@ -897,6 +898,13 @@ public class NTCPTransport extends TransportImpl {
} else {
setOutboundNTCP2Address();
}
if (ssuDisabled) {
// Since we don't have peer testing, start out reachable,
// so peers will attempt to connect to us
long now = _context.clock().now();
_lastInboundIPv4 = now;
_lastInboundIPv6 = now;
}
// TransportManager.startListening() calls router.rebuildRouterInfo()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment