verify IP and netid only when RI parsed

This commit is contained in:
R4SAS 2019-05-17 09:08:30 +03:00
parent a8984ad726
commit c7debcf6ec
3 changed files with 5 additions and 12 deletions

View file

@ -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())
{