mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-05-12 16:44:51 +00:00
Router: Ban hash of all-zero RI
seen live on the net
This commit is contained in:
@@ -18,6 +18,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import net.i2p.data.Base64;
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.data.Hash;
|
||||
import net.i2p.router.peermanager.PeerProfile;
|
||||
@@ -35,6 +36,12 @@ public class Banlist {
|
||||
private final Log _log;
|
||||
private final RouterContext _context;
|
||||
private final Map<Hash, Entry> _entries;
|
||||
|
||||
/**
|
||||
* hash of 387 zeros
|
||||
* @since 0.9.66
|
||||
*/
|
||||
public static final Hash HASH_ZERORI = new Hash(Base64.decode("MRn86w6tHQgE25D7DIejOBCJ-dImSjdsQaOaBuUypkE="));
|
||||
|
||||
public static class Entry {
|
||||
/** when it should expire, per the i2p clock */
|
||||
@@ -70,6 +77,7 @@ public class Banlist {
|
||||
_context.jobQueue().addJob(new Cleanup(_context));
|
||||
// i2pd bug?
|
||||
banlistRouterForever(Hash.FAKE_HASH, "Invalid Hash");
|
||||
banlistRouterForever(HASH_ZERORI, "Invalid Hash");
|
||||
}
|
||||
|
||||
private class Cleanup extends JobImpl {
|
||||
|
||||
Reference in New Issue
Block a user