forked from I2P_Developers/i2p.i2p
Tunnels: Ban peer on excessive build requests
Drop requests if previous or next peer is banned Console: Drop peer when manually banned Update: Drop peer when banlisted
This commit is contained in:
@@ -651,8 +651,10 @@ class NewsFetcher extends UpdateRunner {
|
||||
continue;
|
||||
}
|
||||
Hash h = Hash.create(b);
|
||||
if (!ban.isBanlistedForever(h))
|
||||
if (!ban.isBanlistedForever(h)) {
|
||||
ban.banlistRouterForever(h, reason);
|
||||
_context.commSystem().forceDisconnect(h);
|
||||
}
|
||||
} else {
|
||||
byte[] ip = Addresses.getIP(s);
|
||||
if (ip == null) {
|
||||
|
||||
@@ -22,6 +22,7 @@ public class ConfigPeerHandler extends FormHandler {
|
||||
Hash h = getHash();
|
||||
if (h != null) {
|
||||
_context.banlist().banlistRouterForever(h, _t("Manually banned via {0}"), "<a href=\"configpeer\">configpeer</a>");
|
||||
_context.commSystem().forceDisconnect(h);
|
||||
addFormNotice(_t("Peer") + " " + _peer + " " + _t("banned until restart") );
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user