Merge remote-tracking branch 'origin/dev' into ubuntu/bionic

This commit is contained in:
Jason Rhinelander 2020-11-09 23:20:48 -04:00
commit 085e07c9b6
4 changed files with 4 additions and 15 deletions

View File

@ -31,7 +31,7 @@ set(CPACK_NSIS_DEFINES "RequestExecutionLevel admin")
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '$INSTDIR\\\\bin\\\\tuntap-install.exe /S'\\nExecWait '$INSTDIR\\\\bin\\\\lokinet.exe --install'\\nExecWait '$INSTDIR\\\\bin\\\\lokinet.exe -g C:\\\\ProgramData\\\\lokinet\\\\lokinet.ini'\\nCopyFiles '$INSTDIR\\\\share\\\\bootstrap.signed' C:\\\\ProgramData\\\\lokinet\\\\bootstrap.signed") set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '$INSTDIR\\\\bin\\\\tuntap-install.exe /S'\\nExecWait '$INSTDIR\\\\bin\\\\lokinet.exe --install'\\nExecWait '$INSTDIR\\\\bin\\\\lokinet.exe -g C:\\\\ProgramData\\\\lokinet\\\\lokinet.ini'\\nCopyFiles '$INSTDIR\\\\share\\\\bootstrap.signed' C:\\\\ProgramData\\\\lokinet\\\\bootstrap.signed")
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "ExecWait '$INSTDIR\\\\bin\\\\lokinet.exe --remove'\\nRMDir /r /REBOOTOK C:\\\\ProgramData\\\\lokinet") set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "ExecWait '$INSTDIR\\\\bin\\\\lokinet.exe --remove'\\nRMDir /r /REBOOTOK C:\\\\ProgramData\\\\lokinet")
set(CPACK_NSIS_CREATE_ICONS_EXTRA set(CPACK_NSIS_CREATE_ICONS_EXTRA
"CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Lokinet.lnk' '$INSTDIR\\\\share\\\\gui\\\\lokinet-gui.exe' '-platform windows:dpiawareness=0'" "CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Lokinet.lnk' '$INSTDIR\\\\share\\\\gui\\\\lokinet-gui.exe'"
) )
set(CPACK_NSIS_DELETE_ICONS_EXTRA set(CPACK_NSIS_DELETE_ICONS_EXTRA
"Delete '$SMPROGRAMS\\\\$START_MENU\\\\Lokinet.lnk'" "Delete '$SMPROGRAMS\\\\$START_MENU\\\\Lokinet.lnk'"

View File

@ -6,7 +6,6 @@
#include <constants/link_layer.hpp> #include <constants/link_layer.hpp>
#include <util/meta/memfn.hpp> #include <util/meta/memfn.hpp>
#include <util/status.hpp> #include <util/status.hpp>
#include <router/i_rc_lookup_handler.hpp>
#include <algorithm> #include <algorithm>
#include <cstdlib> #include <cstdlib>
@ -23,12 +22,6 @@ namespace llarp
OutboundMessageHandler::QueueMessage( OutboundMessageHandler::QueueMessage(
const RouterID& remote, const ILinkMessage* msg, SendStatusHandler callback) const RouterID& remote, const ILinkMessage* msg, SendStatusHandler callback)
{ {
if (not _lookupHandler->RemoteIsAllowed(remote))
{
DoCallback(callback, SendStatus::InvalidRouter);
return true;
}
const uint16_t priority = msg->Priority(); const uint16_t priority = msg->Priority();
std::array<byte_t, MAX_LINK_MSG_SIZE> linkmsg_buffer; std::array<byte_t, MAX_LINK_MSG_SIZE> linkmsg_buffer;
llarp_buffer_t buf(linkmsg_buffer); llarp_buffer_t buf(linkmsg_buffer);
@ -112,11 +105,9 @@ namespace llarp
} }
void void
OutboundMessageHandler::Init( OutboundMessageHandler::Init(ILinkManager* linkManager, std::shared_ptr<Logic> logic)
ILinkManager* linkManager, I_RCLookupHandler* lookupHandler, std::shared_ptr<Logic> logic)
{ {
_linkManager = linkManager; _linkManager = linkManager;
_lookupHandler = lookupHandler;
_logic = logic; _logic = logic;
outboundMessageQueues.emplace(zeroID, MessageQueue()); outboundMessageQueues.emplace(zeroID, MessageQueue());

View File

@ -17,7 +17,6 @@ struct llarp_buffer_t;
namespace llarp namespace llarp
{ {
struct I_RCLookupHandler;
struct ILinkManager; struct ILinkManager;
class Logic; class Logic;
enum class SessionResult; enum class SessionResult;
@ -43,7 +42,7 @@ namespace llarp
ExtractStatus() const override; ExtractStatus() const override;
void void
Init(ILinkManager* linkManager, I_RCLookupHandler* lookupHandler, std::shared_ptr<Logic> logic); Init(ILinkManager* linkManager, std::shared_ptr<Logic> logic);
private: private:
using Message = std::pair<std::vector<byte_t>, SendStatusHandler>; using Message = std::pair<std::vector<byte_t>, SendStatusHandler>;
@ -138,7 +137,6 @@ namespace llarp
std::queue<PathID_t> roundRobinOrder; std::queue<PathID_t> roundRobinOrder;
ILinkManager* _linkManager; ILinkManager* _linkManager;
I_RCLookupHandler* _lookupHandler;
std::shared_ptr<Logic> _logic; std::shared_ptr<Logic> _logic;
util::ContentionKiller m_Killer; util::ContentionKiller m_Killer;

View File

@ -551,7 +551,7 @@ namespace llarp
LogInfo("Loaded ", bootstrapRCList.size(), " bootstrap routers"); LogInfo("Loaded ", bootstrapRCList.size(), " bootstrap routers");
// Init components after relevant config settings loaded // Init components after relevant config settings loaded
_outboundMessageHandler.Init(&_linkManager, &_rcLookupHandler, _logic); _outboundMessageHandler.Init(&_linkManager, _logic);
_outboundSessionMaker.Init( _outboundSessionMaker.Init(
this, this,
&_linkManager, &_linkManager,