forked from I2P_Developers/i2p.i2p
SSU: Don't mark peer unreachable if it reports we have a bad port,
as it could be due to the NAT external port range (ticket #2467) Add log message
This commit is contained in:
@ -938,10 +938,18 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
|||||||
|
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
// ignore them
|
// ignore them
|
||||||
if (_log.shouldLog(Log.ERROR))
|
// ticket #2467 natted to an invalid port
|
||||||
_log.error("The router " + from + " told us we have an invalid IP:port "
|
// if the port is the only issue, don't call markUnreachable()
|
||||||
+ Addresses.toString(ourIP, ourPort));
|
if (ourPort < 1024 || ourPort > 65535 || !isValid(ourIP)) {
|
||||||
markUnreachable(from);
|
if (_log.shouldWarn())
|
||||||
|
_log.warn("The router " + from + " told us we have an invalid IP:port "
|
||||||
|
+ Addresses.toString(ourIP, ourPort));
|
||||||
|
markUnreachable(from);
|
||||||
|
} else {
|
||||||
|
_log.logAlways(Log.WARN, "The router " + from + " told us we have an invalid port "
|
||||||
|
+ ourPort
|
||||||
|
+ ", check NAT/firewall configuration, the IANA recommended dynamic outside port range is 49152-65535");
|
||||||
|
}
|
||||||
//_context.banlist().banlistRouter(from, "They said we had an invalid IP", STYLE);
|
//_context.banlist().banlistRouter(from, "They said we had an invalid IP", STYLE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user