forked from I2P_Developers/i2p.i2p
Data: Don't corrupt hidden RI with addresses
This commit is contained in:
@@ -336,15 +336,12 @@ public class RouterInfo extends DatabaseEntry {
|
||||
if (_published < 0) throw new DataFormatException("Invalid published date: " + _published);
|
||||
|
||||
_identity.writeBytes(out);
|
||||
// avoid thrashing objects
|
||||
//DataHelper.writeDate(out, new Date(_published));
|
||||
DataHelper.writeLong(out, 8, _published);
|
||||
// There shouldn't be any addresses when hidden, but if there are,
|
||||
// write them out, so as not to invalidate the signature
|
||||
int sz = _addresses.size();
|
||||
if (sz <= 0 || isHidden()) {
|
||||
// Do not send IP address to peers in hidden mode
|
||||
out.write((byte) 0);
|
||||
} else {
|
||||
out.write((byte) sz);
|
||||
out.write((byte) sz);
|
||||
if (sz > 0) {
|
||||
for (RouterAddress addr : _addresses) {
|
||||
addr.writeBytes(out);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 9;
|
||||
public final static long BUILD = 10;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "-rc";
|
||||
|
||||
Reference in New Issue
Block a user