diff --git a/src/tun_route.c b/src/tun_route.c index 7344873..7a23a4b 100644 --- a/src/tun_route.c +++ b/src/tun_route.c @@ -212,7 +212,7 @@ int tun_route_add(uint32_t ifindex, uint32_t network, uint8_t prefix_len) { char cmd[256]; struct in_addr dest_addr; dest_addr.s_addr = dest; - snprintf(cmd, sizeof(cmd), "netsh interface ip add route %s/%d interface=%lu store=active", + snprintf(cmd, sizeof(cmd), "netsh interface ip add route %s/%d interface=%lu store=active >NUL 2>&1", inet_ntoa(dest_addr), prefix_len, (unsigned long)ifindex); int sys_ret = system(cmd); if (sys_ret == 0) { @@ -257,7 +257,7 @@ int tun_route_del(uint32_t ifindex, uint32_t network, uint8_t prefix_len) { struct in_addr dest_addr; dest_addr.s_addr = htonl(network); char cmd[256]; - snprintf(cmd, sizeof(cmd), "netsh interface ip delete route %s/%d interface=%lu store=active", + snprintf(cmd, sizeof(cmd), "netsh interface ip delete route %s/%d interface=%lu store=active >NUL 2>&1", inet_ntoa(dest_addr), prefix_len, (unsigned long)ifindex); int sys_ret = system(cmd); if (sys_ret == 0) {