mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
verify IP and netid only when RI parsed
This commit is contained in:
parent
a8984ad726
commit
c7debcf6ec
3 changed files with 5 additions and 12 deletions
|
@ -212,10 +212,10 @@ namespace data
|
|||
if (!ecode)
|
||||
{
|
||||
#if BOOST_VERSION >= 104900
|
||||
if (!hostaddr.is_unspecified () && !i2p::util::net::IsInReservedRange(hostaddr)) // check if address is valid
|
||||
if (!hostaddr.is_unspecified () && ((i2p::context.GetNetID () != I2PD_NET_ID) || !i2p::util::net::IsInReservedRange(hostaddr)))
|
||||
#else
|
||||
hostaddr.to_string (ecode);
|
||||
if (!ecode && !i2p::util::net::IsInReservedRange(hostaddr))
|
||||
if (!ecode && ((i2p::context.GetNetID () != I2PD_NET_ID) || !i2p::util::net::IsInReservedRange(hostaddr)))
|
||||
#endif
|
||||
{
|
||||
address->host = hostaddr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue