X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_socket.c;h=5d72471b76ee3ad9eeffdf0075686d4f0e5c83e5;hb=a5c6c6ea1ab657d83a4d8b064ac9bfa9c16adf63;hp=af1bec224fe0feae3e992bf059296190eb84c33c;hpb=8cb4dbb04af15e95e9a302670a4c6fd21e0ebfd6;p=tinc diff --git a/src/net_socket.c b/src/net_socket.c index af1bec22..5d72471b 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -456,9 +456,12 @@ static void do_outgoing_pipe(connection_t *c, const char *command) { sockaddr2str(&c->address, &host, &port); setenv("REMOTEADDRESS", host, true); setenv("REMOTEPORT", port, true); - setenv("NODE", c->name, true); setenv("NAME", myself->name, true); + if(c->name) { + setenv("NODE", c->name, true); + } + if(netname) { setenv("NETNAME", netname, true); } @@ -649,7 +652,6 @@ begin: c->status.connecting = true; c->name = xstrdup(outgoing->node->name); c->outmaclength = myself->connection->outmaclength; - c->outcompression = myself->connection->outcompression; c->last_ping_time = now.tv_sec; connection_add(c); @@ -758,7 +760,6 @@ void handle_new_meta_connection(void *data, int flags) { c = new_connection(); c->name = xstrdup(""); c->outmaclength = myself->connection->outmaclength; - c->outcompression = myself->connection->outcompression; c->address = sa; c->hostname = sockaddr2hostname(&sa);