projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7034338
)
Fix ans_key exchange in recent changes
author
Michael Tokarev
<mjt@tls.msk.ru>
Sun, 24 May 2009 18:32:24 +0000
(22:32 +0400)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 24 May 2009 23:30:01 +0000
(
01:30
+0200)
send_ans_key() was using the wrong in vs. outkeylength to
terminate the key being sent, so it was always empty.
src/protocol_key.c
patch
|
blob
|
history
diff --git
a/src/protocol_key.c
b/src/protocol_key.c
index d9719ca49df40c06b58d2628190a4348edc76ece..64225fd2e1c5611ec7ec93cefdf7ac148b783f9e 100644
(file)
--- a/
src/protocol_key.c
+++ b/
src/protocol_key.c
@@
-172,7
+172,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->
out
keylength * 2] = '\0';
+ key[to->
in
keylength * 2] = '\0';
return send_request(to->nexthop->connection, "%d %s %s %s %d %d %d %d", ANS_KEY,
myself->name, to->name, key,