X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_auth.c;h=ddecbc62eb1f45170f69fa0581c435a45e7bf228;hb=42ed8fd4cf3b3e527a38c03d713739fcdc6bf520;hp=13dae1d34d495558ee6e7ed6f8e6fe06d8631cfb;hpb=40b21d3ff4b50f7688e49651d1237987ce45128d;p=tinc diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 13dae1d3..ddecbc62 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -41,9 +41,8 @@ #include "xalloc.h" bool send_id(connection_t *c) { - if(proxytype && c->outgoing) - if(!send_proxyrequest(c)) - return false; + if(proxytype && c->outgoing && !c->status.proxy_passed) + return send_proxyrequest(c); return send_request(c, "%d %s %d", ID, myself->connection->name, myself->connection->protocol_version); @@ -196,6 +195,7 @@ bool send_metakey(connection_t *c) { return false; } + c->outbudget = (uint64_t)4 << EVP_CIPHER_key_length(c->outcipher); c->status.encryptout = true; } @@ -274,6 +274,7 @@ bool metakey_h(connection_t *c) { return false; } + c->inbudget = (uint64_t)4 << EVP_CIPHER_key_length(c->incipher); c->status.decryptin = true; } else { c->incipher = NULL;