summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-06-07 00:56:47 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-06-07 00:56:47 +0200
commitb0a169a1465a75592f0083a3e4e17c307878fc73 (patch)
tree4797ab4b3840cff3f3f9214699b3d9a844fc42fb /src/peer.c
parent25bf4f4901fe2360d29b7ea5a49b817310ac90dc (diff)
downloadfastd-b0a169a1465a75592f0083a3e4e17c307878fc73.tar
fastd-b0a169a1465a75592f0083a3e4e17c307878fc73.zip
Limit handshake frequency where possible
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/peer.c b/src/peer.c
index 078bfdc..f412836 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -176,9 +176,17 @@ static inline void setup_peer(fastd_context *ctx, fastd_peer *peer) {
peer->address = peer->config->address;
peer->established = false;
+
peer->last_resolve = (struct timespec){0, 0};
peer->last_resolve_return = (struct timespec){0, 0};
peer->seen = (struct timespec){0, 0};
+
+ peer->last_handshake = (struct timespec){0, 0};
+ peer->last_handshake_address.sa.sa_family = AF_UNSPEC;
+
+ peer->last_handshake_response = (struct timespec){0, 0};
+ peer->last_handshake_response_address.sa.sa_family = AF_UNSPEC;
+
peer->protocol_state = NULL;
if (!fastd_peer_is_floating(peer))