From 09806c3c0f4a933c83ad5667e7dc2bf738c3ae1b Mon Sep 17 00:00:00 2001 From: DcruBro Date: Fri, 14 Nov 2025 20:36:19 +0100 Subject: [PATCH] test --- src/common/virtual_interface.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/common/virtual_interface.cpp b/src/common/virtual_interface.cpp index 78bec31..369ffa6 100644 --- a/src/common/virtual_interface.cpp +++ b/src/common/virtual_interface.cpp @@ -187,18 +187,13 @@ namespace ColumnLynx::Net { std::string ipStr = ipToString(clientIP); std::string peerStr = ipToString(serverIP); + // Set netmask (/24 CIDR temporarily with raw command, improve later) 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); system(cmd); - // Reset cmd buffer - 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); + Utils::log("Executed command: " + std::string(cmd)); return true; }