Comment some code
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#include <columnlynx/common/net/virtual_interface.hpp>
|
||||
|
||||
// This is all fucking voodoo dark magic.
|
||||
|
||||
namespace ColumnLynx::Net {
|
||||
// ------------------------------ Constructor ------------------------------
|
||||
VirtualInterface::VirtualInterface(const std::string& ifName)
|
||||
|
||||
@@ -196,6 +196,13 @@ namespace ColumnLynx::Net::TCP {
|
||||
Nonce symNonce{}; // All zeros
|
||||
|
||||
uint32_t clientIP = SessionRegistry::getInstance().getFirstAvailableIP();
|
||||
|
||||
if (clientIP == 0) {
|
||||
Utils::warn("Out of available IPs! Disconnecting client " + reqAddr);
|
||||
disconnect();
|
||||
return;
|
||||
}
|
||||
|
||||
Protocol::TunConfig tunConfig{};
|
||||
tunConfig.version = Utils::protocolVersion();
|
||||
tunConfig.prefixLength = 24;
|
||||
|
||||
Reference in New Issue
Block a user