X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_key.c;h=41479148930847f864c7233daa9995bc16493a4d;hp=d9719ca49df40c06b58d2628190a4348edc76ece;hb=261d1eac1c5bbe6c87aa707566f290e611169432;hpb=e012e752f4f1a2b06dfab4640bbbea8f084999ff diff --git a/src/protocol_key.c b/src/protocol_key.c index d9719ca4..41479148 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -154,6 +154,7 @@ bool send_ans_key(node_t *to) to->incipher = myself->incipher; to->inkeylength = myself->inkeylength; to->indigest = myself->indigest; + to->inmaclength = myself->inmaclength; to->incompression = myself->incompression; // Allocate memory for key @@ -172,7 +173,7 @@ bool send_ans_key(node_t *to) // Convert to hexadecimal and send key = alloca(2 * to->inkeylength + 1); bin2hex(to->inkey, key, to->inkeylength); - key[to->outkeylength * 2] = '\0'; + key[to->inkeylength * 2] = '\0'; return send_request(to->nexthop->connection, "%d %s %s %s %d %d %d %d", ANS_KEY, myself->name, to->name, key,