Commit 5b91a0d0 authored by nanamicat's avatar nanamicat

float ip

parent 41374498
...@@ -109,13 +109,13 @@ int main(int argc, char *argv[]) { ...@@ -109,13 +109,13 @@ int main(int argc, char *argv[]) {
local_id = atoi(getenv("local_id")); local_id = atoi(getenv("local_id"));
remote_id = atoi(getenv("remote_id")); remote_id = atoi(getenv("remote_id"));
auto endpoint = gethostbyname(getenv("endpoint")); auto endpoint = getenv("endpoint");
unsigned char proto = atoi(getenv("proto")); unsigned char proto = atoi(getenv("proto"));
secret = getenv("secret"); secret = getenv("secret");
auto dev = getenv("dev"); auto dev = getenv("dev");
auto up = getenv("up"); auto up = getenv("up");
remote_addr.sin_addr.s_addr = ((in_addr *) endpoint->h_name)->s_addr; remote_addr.sin_addr.s_addr = ((in_addr *) gethostbyname(endpoint)->h_name)->s_addr;
ifreq ifr{}; ifreq ifr{};
ifr.ifr_flags = IFF_TUN | IFF_NO_PI; ifr.ifr_flags = IFF_TUN | IFF_NO_PI;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment