* Transport: Make 0.0.0.0/8 and 169.254.0.0/16 private
This commit is contained in:
@ -154,8 +154,8 @@ public abstract class TransportImpl implements Transport {
|
|||||||
if (msToSend > 1000) {
|
if (msToSend > 1000) {
|
||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.WARN))
|
||||||
_log.warn("afterSend slow: [success=" + sendSuccessful + "] " + msg.getMessageSize() + "byte "
|
_log.warn("afterSend slow: [success=" + sendSuccessful + "] " + msg.getMessageSize() + "byte "
|
||||||
+ msg.getMessageType() + " " + msg.getMessageId() + " from "
|
+ msg.getMessageType() + " " + msg.getMessageId() + " to "
|
||||||
+ _context.routerHash().toBase64().substring(0,6) + " took " + msToSend
|
+ msg.getTarget().getIdentity().calculateHash().toBase64().substring(0,6) + " took " + msToSend
|
||||||
+ "/" + msg.getTransmissionTime());
|
+ "/" + msg.getTransmissionTime());
|
||||||
}
|
}
|
||||||
//if (true)
|
//if (true)
|
||||||
@ -484,6 +484,8 @@ public abstract class TransportImpl implements Transport {
|
|||||||
if ( ((addr[0]&0xFF) == 172) && ((addr[1]&0xFF) >= 16) && ((addr[1]&0xFF) <= 31) ) return false;
|
if ( ((addr[0]&0xFF) == 172) && ((addr[1]&0xFF) >= 16) && ((addr[1]&0xFF) <= 31) ) return false;
|
||||||
if ( ((addr[0]&0xFF) == 192) && ((addr[1]&0xFF) == 168) ) return false;
|
if ( ((addr[0]&0xFF) == 192) && ((addr[1]&0xFF) == 168) ) return false;
|
||||||
if ((addr[0]&0xFF) >= 224) return false; // no multicast
|
if ((addr[0]&0xFF) >= 224) return false; // no multicast
|
||||||
|
if ((addr[0]&0xFF) == 0) return false;
|
||||||
|
if ( ((addr[0]&0xFF) == 169) && ((addr[1]&0xFF) == 254) ) return false;
|
||||||
return true; // or at least possible to be true
|
return true; // or at least possible to be true
|
||||||
} else if (addr.length == 16) {
|
} else if (addr.length == 16) {
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user