diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-01 04:00:33 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-01 04:00:33 +0200 |
commit | 2d7472633ac356f1bc8f8122a1cc3b3226a95697 (patch) | |
tree | a70a6bc36aaf9948ee4d46cf26a792166608bc6b /src/peer.c | |
parent | 6abadfbe0b3e10fff89579b20e8d3a47f5eafd4d (diff) | |
download | fastd-2d7472633ac356f1bc8f8122a1cc3b3226a95697.tar fastd-2d7472633ac356f1bc8f8122a1cc3b3226a95697.zip |
Don't stop repeating handshakes until valid data using the new key is received
Diffstat (limited to 'src/peer.c')
-rw-r--r-- | src/peer.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -148,6 +148,10 @@ fastd_peer* fastd_peer_add_temp(fastd_context *ctx, const fastd_peer_address *ad return peer; } +void fastd_peer_clean_handshakes(fastd_context *ctx, fastd_peer *peer) { + fastd_task_delete_peer_handshakes(ctx, peer); +} + fastd_peer* fastd_peer_set_established_merge(fastd_context *ctx, fastd_peer *perm_peer, fastd_peer *temp_peer) { pr_debug(ctx, "merging peer %P into %P", temp_peer, perm_peer); @@ -168,7 +172,6 @@ fastd_peer* fastd_peer_set_established_merge(fastd_context *ctx, fastd_peer *per } fastd_task_replace_peer(ctx, temp_peer, perm_peer); - fastd_task_delete_peer_handshakes(ctx, perm_peer); fastd_peer_reset(ctx, temp_peer); @@ -178,8 +181,6 @@ fastd_peer* fastd_peer_set_established_merge(fastd_context *ctx, fastd_peer *per } void fastd_peer_set_established(fastd_context *ctx, fastd_peer *peer) { - fastd_task_delete_peer_handshakes(ctx, peer); - switch(peer->state) { case STATE_WAIT: pr_info(ctx, "Connection with %P established.", peer); |