handle 'reservedrange' param properly

This commit is contained in:
Vort 2024-01-12 17:13:07 +02:00
parent ca9782dd0d
commit 34d75b08dd
3 changed files with 8 additions and 4 deletions

View File

@ -160,6 +160,10 @@ namespace util
int netID; i2p::config::GetOption("netid", netID);
i2p::context.SetNetID (netID);
bool checkReserved; i2p::config::GetOption("reservedrange", checkReserved);
i2p::transport::transports.SetCheckReserved(checkReserved);
i2p::context.Init ();
i2p::transport::InitTransports ();

View File

@ -1200,9 +1200,6 @@ namespace transport
else
i2p::context.PublishSSU2Address (ssu2port, false, ipv4, ipv6); // unpublish
}
bool checkReserved; i2p::config::GetOption("reservedrange", checkReserved);
transports.SetCheckReserved (checkReserved);
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2023, The PurpleI2P Project
* Copyright (c) 2013-2024, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*
@ -44,6 +44,9 @@ namespace api
int netID; i2p::config::GetOption("netid", netID);
i2p::context.SetNetID (netID);
bool checkReserved; i2p::config::GetOption("reservedrange", checkReserved);
i2p::transport::transports.SetCheckReserved(checkReserved);
i2p::context.Init ();
}