forked from I2P_Developers/i2p.i2p
Fixes to isPubliclyRoutable() based on IPv6 config
This commit is contained in:
@ -7,7 +7,7 @@ import java.util.Map;
|
||||
|
||||
import net.i2p.router.Router;
|
||||
import net.i2p.router.transport.FIFOBandwidthRefiller;
|
||||
import net.i2p.router.transport.TransportImpl;
|
||||
import net.i2p.router.transport.TransportUtil;
|
||||
import net.i2p.router.transport.TransportManager;
|
||||
import net.i2p.router.transport.udp.UDPTransport;
|
||||
import net.i2p.router.web.ConfigServiceHandler;
|
||||
@ -370,7 +370,8 @@ public class ConfigNetHandler extends FormHandler {
|
||||
addFormError(_("Invalid address") + ": " + addr);
|
||||
return false;
|
||||
}
|
||||
boolean rv = TransportImpl.isPubliclyRoutable(iab);
|
||||
// TODO set IPv6 arg based on configuration?
|
||||
boolean rv = TransportUtil.isPubliclyRoutable(iab, true);
|
||||
if (!rv)
|
||||
addFormError(_("The hostname or IP {0} is not publicly routable", addr));
|
||||
return rv;
|
||||
|
@ -24,7 +24,7 @@ import net.i2p.router.RouterContext;
|
||||
import net.i2p.router.RouterVersion;
|
||||
import net.i2p.router.TunnelPoolSettings;
|
||||
import net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseFacade;
|
||||
import net.i2p.router.transport.ntcp.NTCPAddress;
|
||||
import net.i2p.router.transport.TransportUtil;
|
||||
import net.i2p.stat.Rate;
|
||||
import net.i2p.stat.RateStat;
|
||||
import net.i2p.util.PortMapper;
|
||||
@ -159,7 +159,8 @@ public class SummaryHelper extends HelperBase {
|
||||
switch (status) {
|
||||
case CommSystemFacade.STATUS_OK:
|
||||
RouterAddress ra = routerInfo.getTargetAddress("NTCP");
|
||||
if (ra == null || (new NTCPAddress(ra)).isPubliclyRoutable())
|
||||
// TODO set IPv6 arg based on configuration?
|
||||
if (ra == null || TransportUtil.isPubliclyRoutable(ra.getIP(), true))
|
||||
return _("OK");
|
||||
return _("ERR-Private TCP Address");
|
||||
case CommSystemFacade.STATUS_DIFFERENT:
|
||||
|
Reference in New Issue
Block a user