Temporary /24 netmask for macOS
This commit is contained in:
@@ -191,6 +191,14 @@ namespace ColumnLynx::Net {
|
||||
"ifconfig utun0 %s %s mtu %d 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);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user