mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
[reseed] skip records in reserved IP ranges, check Yggdrasil avalability if domain resolves in ygg address
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
ec5c13a95e
commit
58ef08310d
1 changed files with 13 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2022, The PurpleI2P Project
|
* Copyright (c) 2013-2023, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
|
@ -687,8 +687,18 @@ namespace data
|
||||||
while (it != end)
|
while (it != end)
|
||||||
{
|
{
|
||||||
boost::asio::ip::tcp::endpoint ep = *it;
|
boost::asio::ip::tcp::endpoint ep = *it;
|
||||||
if ((ep.address ().is_v4 () && i2p::context.SupportsV4 ()) ||
|
if (
|
||||||
(ep.address ().is_v6 () && i2p::context.SupportsV6 ()))
|
(
|
||||||
|
!i2p::util::net::IsInReservedRange(ep.address ()) && (
|
||||||
|
(ep.address ().is_v4 () && i2p::context.SupportsV4 ()) ||
|
||||||
|
(ep.address ().is_v6 () && i2p::context.SupportsV6 ())
|
||||||
|
)
|
||||||
|
) ||
|
||||||
|
(
|
||||||
|
i2p::util::net::IsYggdrasilAddress (ep.address ()) &&
|
||||||
|
i2p::context.SupportsMesh ()
|
||||||
|
)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
s.lowest_layer().connect (ep, ecode);
|
s.lowest_layer().connect (ep, ecode);
|
||||||
if (!ecode)
|
if (!ecode)
|
||||||
|
|
Loading…
Add table
Reference in a new issue