forked from I2P_Developers/i2p.i2p
NTCP: Fixes for SSU disabled
Update RI reachability after first inbound connection Allow local address in test mode
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2022-02-09 zzz
|
||||
* NTCP: Fixes for SSU disabled
|
||||
|
||||
2022-02-03 zzz
|
||||
* SSU: Don't bid on connection to buggy routers
|
||||
* Tunnels: Avoid buggy routers
|
||||
|
||||
@@ -18,10 +18,10 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Git";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 11;
|
||||
public final static long BUILD = 12;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
public final static String EXTRA = "-rc";
|
||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + FULL_VERSION);
|
||||
|
||||
@@ -329,10 +329,28 @@ public class NTCPTransport extends TransportImpl {
|
||||
old = _conByIdent.put(peer, con);
|
||||
}
|
||||
if (con.isIPv6()) {
|
||||
long last = _lastInboundIPv6;
|
||||
Status oldStatus;
|
||||
if (last <= 0)
|
||||
oldStatus = getReachabilityStatus();
|
||||
else
|
||||
oldStatus = null;
|
||||
_lastInboundIPv6 = con.getCreated();
|
||||
// Get that "R" cap in the netdb ASAP, esp. when SSU disabled
|
||||
if (last <= 0)
|
||||
addressChanged(oldStatus);
|
||||
_context.statManager().addRateData("ntcp.inboundIPv6Conn", 1);
|
||||
} else {
|
||||
long last = _lastInboundIPv4;
|
||||
Status oldStatus;
|
||||
if (last <= 0)
|
||||
oldStatus = getReachabilityStatus();
|
||||
else
|
||||
oldStatus = null;
|
||||
_lastInboundIPv4 = con.getCreated();
|
||||
// Get that "R" cap in the netdb ASAP, esp. when SSU disabled
|
||||
if (last <= 0)
|
||||
addressChanged(oldStatus);
|
||||
_context.statManager().addRateData("ntcp.inboundIPv4Conn", 1);
|
||||
}
|
||||
return old;
|
||||
@@ -1440,7 +1458,7 @@ public class NTCPTransport extends TransportImpl {
|
||||
// must be set before isValid() call
|
||||
_haveIPv6Address = true;
|
||||
}
|
||||
if (ip != null && !isValid(ip)) {
|
||||
if (ip != null && !isValid(ip) && !allowLocal()) {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Invalid address: " + Addresses.toString(ip, port) + " from: " + source);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user