First working alpha, version a0.4 #7

Merged
dcrubro merged 22 commits from beta into master 2025-11-18 20:09:11 +00:00
Showing only changes of commit 09806c3c0f - Show all commits

View File

@@ -187,18 +187,13 @@ namespace ColumnLynx::Net {
std::string ipStr = ipToString(clientIP); std::string ipStr = ipToString(clientIP);
std::string peerStr = ipToString(serverIP); std::string peerStr = ipToString(serverIP);
// Set netmask (/24 CIDR temporarily with raw command, improve later)
snprintf(cmd, sizeof(cmd), snprintf(cmd, sizeof(cmd),
"ifconfig utun0 %s %s mtu %d up", "ifconfig utun0 %s %s mtu %d netmask 255.255.255.0 up",
ipStr.c_str(), peerStr.c_str(), mtu); ipStr.c_str(), peerStr.c_str(), mtu);
system(cmd); system(cmd);
// Reset cmd buffer Utils::log("Executed command: " + std::string(cmd));
cmd[0] = '\0';
// Set netmask (/24 CIDR temporarily with raw command, improve later)
snprintf(cmd, sizeof(cmd),
"ifconfig utun0 netmask 255.255.255.0");
system(cmd);
return true; return true;
} }