X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_auth.c;h=287681b5d5973e8327c93fd400cee92290d5978a;hb=8b9e5af0d93069a81ce2ebed9899eedf3b7b184b;hp=d3eef21e0eb4c2cc8903446ba5bcd2a89666c14f;hpb=40c28589328a2aa96c2ce1419c5d90616c758b3d;p=tinc diff --git a/src/protocol_auth.c b/src/protocol_auth.c index d3eef21e..287681b5 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -1,7 +1,7 @@ /* protocol_auth.c -- handle the meta-protocol, authentication Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2010 Guus Sliepen + 2000-2012 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -72,6 +72,10 @@ bool id_h(connection_t *c, char *request) { c->status.control = true; c->allow_request = CONTROL; c->last_ping_time = time(NULL) + 3600; + + free(c->name); + c->name = xstrdup(""); + return send_request(c, "%d %d %d", ACK, TINC_CTL_VERSION_CURRENT, getpid()); } @@ -144,7 +148,7 @@ bool id_h(connection_t *c, char *request) { else snprintf(label, sizeof label, "tinc TCP key expansion %s %s", c->name, myself->name); - return sptps_start(&c->sptps, c, c->outgoing, myself->connection->ecdsa, c->ecdsa, label, sizeof label, send_meta_sptps, receive_meta_sptps); + return sptps_start(&c->sptps, c, c->outgoing, false, myself->connection->ecdsa, c->ecdsa, label, sizeof label, send_meta_sptps, receive_meta_sptps); } else { return send_metakey(c); }