diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-28 00:55:39 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-28 00:55:39 +0200 |
commit | 22a6b5706593d222bfc602859dbccd7beb5231ed (patch) | |
tree | 6cb946edf94469fb04a935eb3638f80b585475f1 /src/peer.c | |
parent | b69d34071b26e8a6230cde199989071b833d8c99 (diff) | |
download | fastd-22a6b5706593d222bfc602859dbccd7beb5231ed.tar fastd-22a6b5706593d222bfc602859dbccd7beb5231ed.zip |
Make crypto handshake with floating peers work
Diffstat (limited to 'src/peer.c')
-rw-r--r-- | src/peer.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -134,9 +134,14 @@ fastd_peer* fastd_peer_add_temp(fastd_context *ctx, const fastd_peer_address *ad fastd_peer* fastd_peer_merge(fastd_context *ctx, fastd_peer *perm_peer, fastd_peer *temp_peer) { pr_debug(ctx, "merging peer %P into %P", temp_peer, perm_peer); + ctx->conf->protocol->free_peer_state(ctx, perm_peer); + perm_peer->address = temp_peer->address; perm_peer->state = fastd_peer_is_established(temp_peer) ? STATE_ESTABLISHED : STATE_WAIT; perm_peer->seen = temp_peer->seen; + perm_peer->protocol_state = temp_peer->protocol_state; + + temp_peer->protocol_state = NULL; int i; for (i = 0; i < ctx->n_eth_addr; i++) { |