X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;ds=sidebyside;f=src%2Fprotocol_auth.c;h=175aee0f28187291e23db4e330deff66a8efbafe;hb=cc0c35267f8fac4f82622ff73474ed1e2d3a1e36;hp=ccb7976c2700813131a62206f8cd7d3d1443db75;hpb=19be9cf7150858311f7898fa3fb525d692d02f64;p=tinc diff --git a/src/protocol_auth.c b/src/protocol_auth.c index ccb7976c..175aee0f 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -83,10 +83,10 @@ static bool send_proxyrequest(connection_t *c) { s5req[i++] = 2; s5req[i++] = 1; s5req[i++] = strlen(proxyuser); - strcpy(s5req + i, proxyuser); + memcpy(s5req + i, proxyuser, strlen(proxyuser)); i += strlen(proxyuser); s5req[i++] = strlen(proxypass); - strcpy(s5req + i, proxypass); + memcpy(s5req + i, proxypass, strlen(proxypass)); i += strlen(proxypass); c->tcplen += 2; } else { @@ -506,7 +506,7 @@ bool send_ack(connection_t *c) { get_config_int(lookup_config(c->config_tree, "Weight"), &c->estimated_weight); - return send_request(c, "%d %s %d %x", ACK, myport, c->estimated_weight, c->options); + return send_request(c, "%d %s %d %x", ACK, myport, c->estimated_weight, (c->options & 0xffffff) | (PROT_MINOR << 24)); } static void send_everything(connection_t *c) { @@ -626,9 +626,6 @@ bool ack_h(connection_t *c, const char *request) { c->options &= ~OPTION_CLAMP_MSS; } - if(c->protocol_minor > 0) - c->node->status.ecdh = true; - /* Activate this connection */ c->allow_request = ALL;