summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-06-06 22:38:36 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-06-06 22:38:36 +0200
commit33ec56398316af14eec762406f21e649fcc3cbf2 (patch)
tree02564aa8e99f58d170fd8d844cdc0415a44a4045 /src/peer.c
parent7297dd73d5bfa05f829bf44cd8480627d5b387f8 (diff)
downloadfastd-33ec56398316af14eec762406f21e649fcc3cbf2.tar
fastd-33ec56398316af14eec762406f21e649fcc3cbf2.zip
Limit resolve frequency
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/peer.c b/src/peer.c
index 23cb170..078bfdc 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -176,6 +176,8 @@ 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->protocol_state = NULL;
@@ -284,6 +286,7 @@ bool fastd_peer_claim_address(fastd_context *ctx, fastd_peer *new_peer, const fa
break;
}
else {
+ memset(&new_peer->address, 0, sizeof(fastd_peer_address));
return false;
}
}