Remember whether we sent our key to another node.

In tinc 1.0.x, this was tracked in node->inkey, however in tinc 1.1 we have an abstraction layer for
the legacy cipher and digest, and we don't keep an explicit copy of the key around. We cannot use
cipher_active() or digest_active(), since it is possible to set both to the null algorithm. So add a bit to
node_status_t.
This commit is contained in:
Guus Sliepen 2015-01-10 22:26:33 +01:00
parent f1f2df0738
commit 6056f1c13b
4 changed files with 7 additions and 2 deletions

View file

@ -303,6 +303,8 @@ bool send_ans_key(node_t *to) {
to->received = 0;
if(replaywin) memset(to->late, 0, replaywin);
to->status.validkey_in = true;
return send_request(to->nexthop->connection, "%d %s %s %s %d %d %d %d", ANS_KEY,
myself->name, to->name, key,
cipher_get_nid(to->incipher),