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
|
@ -3,9 +3,7 @@
|
|||
#include <boost/asio.hpp>
|
||||
|
||||
#include "util.h"
|
||||
#include "Config.h"
|
||||
#include "Log.h"
|
||||
#include "version.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <stdlib.h>
|
||||
|
@ -346,11 +344,6 @@ namespace net
|
|||
}
|
||||
|
||||
bool IsInReservedRange(const boost::asio::ip::address& host) {
|
||||
// ignore checking for netid other than main network
|
||||
int NetID; i2p::config::GetOption("netid", NetID);
|
||||
if (NetID != I2PD_NET_ID)
|
||||
return false;
|
||||
|
||||
// https://en.wikipedia.org/wiki/Reserved_IP_addresses
|
||||
if(host.is_v4())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue