diff --git a/tunsafe_bsd.cpp b/tunsafe_bsd.cpp index 17f855c..2772d06 100644 --- a/tunsafe_bsd.cpp +++ b/tunsafe_bsd.cpp @@ -36,7 +36,7 @@ #include #include #elif defined(OS_LINUX) -#include +// #include #include #include #include @@ -367,9 +367,9 @@ static void AddOrRemoveRoute(const RouteInfo &cd, bool remove) { const char *cmd = remove ? "del" : "add"; const char *proto = (cd.family == AF_INET) ? NULL : "-6"; if (cd.dev.empty()) { - RunCommand("/sbin/ip %s route %s %s via %s", proto, cmd, buf1, buf2); + RunCommand("/usr/sbin/ip %s route %s %s via %s", proto, cmd, buf1, buf2); } else { - RunCommand("/sbin/ip %s route %s %s dev %s", proto, cmd, buf1, cd.dev.c_str()); + RunCommand("/usr/sbin/ip %s route %s %s dev %s", proto, cmd, buf1, cd.dev.c_str()); } #elif defined(OS_MACOSX) || defined(OS_FREEBSD) const char *cmd = remove ? "delete" : "add"; @@ -436,10 +436,10 @@ bool TunsafeBackendBsd::Configure(const TunConfig &&config, TunConfigOut *out) o addresses_to_remove_ = config.addresses; #if defined(OS_LINUX) - RunCommand("/sbin/ip address flush dev %s scope global", devname_); + RunCommand("/usr/sbin/ip address flush dev %s scope global", devname_); for(const WgCidrAddr &a : config.addresses) - RunCommand("/sbin/ip address add dev %s %s", devname_, print_ip_prefix(buf, a.size == 32 ? AF_INET : AF_INET6, a.addr, a.cidr)); - RunCommand("/sbin/ip link set dev %s mtu %d up", devname_, config.mtu); + RunCommand("/usr/sbin/ip address add dev %s %s", devname_, print_ip_prefix(buf, a.size == 32 ? AF_INET : AF_INET6, a.addr, a.cidr)); + RunCommand("/usr/sbin/ip link set dev %s mtu %d up", devname_, config.mtu); #else for(const WgCidrAddr &a : config.addresses) { if (a.size == 32) { @@ -515,7 +515,7 @@ void TunsafeBackendBsd::CleanupRoutes() { #if defined(OS_LINUX) for(const WgCidrAddr &a : addresses_to_remove_) - RunCommand("/sbin/ip address del dev %s %s", devname_, print_ip_prefix(buf, a.size == 32 ? AF_INET : AF_INET6, a.addr, a.cidr)); + RunCommand("/usr/sbin/ip address del dev %s %s", devname_, print_ip_prefix(buf, a.size == 32 ? AF_INET : AF_INET6, a.addr, a.cidr)); #else for(const WgCidrAddr &a : addresses_to_remove_) { if (a.size == 32) { diff --git a/tunsafe_cpu.h b/tunsafe_cpu.h index c19f6b1..d5f1a71 100644 --- a/tunsafe_cpu.h +++ b/tunsafe_cpu.h @@ -32,7 +32,7 @@ extern uint32 x86_pcap[3]; extern uint32 arm_pcap[1]; -#define ARM_PCAP_NEON (arm_pcap[0] & (1 << 0)) +#define ARM_PCAP_NEON 0 #endif // defined(ARCH_CPU_ARM_FAMILY)