forked from I2P_Developers/i2p.i2p
Sybil: Don't catch all the i2pds publishing ::1
This commit is contained in:
@@ -116,7 +116,8 @@ public class Analysis extends JobImpl implements RouterApp, Runnable {
|
|||||||
public static final long SHORT_REMOVE_TIME = 2*24*60*60*1000L;
|
public static final long SHORT_REMOVE_TIME = 2*24*60*60*1000L;
|
||||||
public static final long DEFAULT_FREQUENCY = 24*60*60*1000L;
|
public static final long DEFAULT_FREQUENCY = 24*60*60*1000L;
|
||||||
public static final float MIN_BLOCK_POINTS = 12.01f;
|
public static final float MIN_BLOCK_POINTS = 12.01f;
|
||||||
|
private static final byte[] IPV6_LOCALHOST = new byte[16];
|
||||||
|
static { IPV6_LOCALHOST[15] = 1; }
|
||||||
|
|
||||||
/** Get via getInstance() */
|
/** Get via getInstance() */
|
||||||
private Analysis(RouterContext ctx, ClientAppManager mgr, String[] args) {
|
private Analysis(RouterContext ctx, ClientAppManager mgr, String[] args) {
|
||||||
@@ -584,7 +585,9 @@ public class Analysis extends JobImpl implements RouterApp, Runnable {
|
|||||||
for (RouterAddress ra : ri.getAddresses()) {
|
for (RouterAddress ra : ri.getAddresses()) {
|
||||||
byte[] rv = ra.getIP();
|
byte[] rv = ra.getIP();
|
||||||
if (rv != null && rv.length == 16)
|
if (rv != null && rv.length == 16)
|
||||||
return rv;
|
// i2pd
|
||||||
|
if (!DataHelper.eq(rv, IPV6_LOCALHOST))
|
||||||
|
return rv;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user