mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
specify and check netId
This commit is contained in:
parent
2a4d78d9bf
commit
0ca3fb5af0
4 changed files with 20 additions and 9 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "I2PEndian.h"
|
||||
#include <fstream>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include "version.h"
|
||||
#include "Crypto.h"
|
||||
#include "Base.h"
|
||||
#include "Timestamp.h"
|
||||
|
@ -243,6 +244,12 @@ namespace data
|
|||
// extract caps
|
||||
if (!strcmp (key, "caps"))
|
||||
ExtractCaps (value);
|
||||
// check netId
|
||||
if (!strcmp (key, "netId") && atoi (value) != I2PD_NET_ID)
|
||||
{
|
||||
LogPrint (eLogError, "Unexpected netid=", value);
|
||||
m_IsUnreachable = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_SupportedTransports || !m_Addresses.size() || (UsesIntroducer () && !introducers))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue