Skip to content

Commit

Permalink
Merge pull request #2007 from Vort/reservedrange2
Browse files Browse the repository at this point in the history
handle 'reservedrange' param properly
  • Loading branch information
orignal authored Jan 12, 2024
2 parents ca9782d + 34d75b0 commit d724948
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions daemon/Daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
Expand Down
3 changes: 0 additions & 3 deletions libi2pd/Transports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 4 additions & 1 deletion libi2pd/api.cpp
Original file line number Diff line number Diff line change
@@ -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
*
Expand Down Expand Up @@ -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 ();
}

Expand Down

0 comments on commit d724948

Please sign in to comment.