X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_socket.c;h=5d72471b76ee3ad9eeffdf0075686d4f0e5c83e5;hb=a5c6c6ea1ab657d83a4d8b064ac9bfa9c16adf63;hp=e154f4864cf5554f2203361d5883c1aca1f9fe06;hpb=0289162552cd85375605044c696e2a3294e7aa9a;p=tinc diff --git a/src/net_socket.c b/src/net_socket.c index e154f486..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); } @@ -648,12 +651,7 @@ begin: c->last_ping_time = time(NULL); c->status.connecting = true; c->name = xstrdup(outgoing->node->name); -#ifndef DISABLE_LEGACY - c->outcipher = myself->connection->outcipher; - c->outdigest = myself->connection->outdigest; -#endif c->outmaclength = myself->connection->outmaclength; - c->outcompression = myself->connection->outcompression; c->last_ping_time = now.tv_sec; connection_add(c); @@ -761,12 +759,7 @@ void handle_new_meta_connection(void *data, int flags) { c = new_connection(); c->name = xstrdup(""); -#ifndef DISABLE_LEGACY - c->outcipher = myself->connection->outcipher; - c->outdigest = myself->connection->outdigest; -#endif c->outmaclength = myself->connection->outmaclength; - c->outcompression = myself->connection->outcompression; c->address = sa; c->hostname = sockaddr2hostname(&sa);