Browse Source

handle 'reservedrange' param properly

pull/2007/head
Vort 12 months ago
parent
commit
34d75b08dd
  1. 4
      daemon/Daemon.cpp
  2. 3
      libi2pd/Transports.cpp
  3. 5
      libi2pd/api.cpp

4
daemon/Daemon.cpp

@ -160,6 +160,10 @@ namespace util @@ -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 ();

3
libi2pd/Transports.cpp

@ -1200,9 +1200,6 @@ namespace transport @@ -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);
}
}
}

5
libi2pd/api.cpp

@ -1,5 +1,5 @@ @@ -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 @@ -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 ();
}

Loading…
Cancel
Save