diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-06-06 22:38:36 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-06-06 22:38:36 +0200 |
commit | 33ec56398316af14eec762406f21e649fcc3cbf2 (patch) | |
tree | 02564aa8e99f58d170fd8d844cdc0415a44a4045 /src/peer.c | |
parent | 7297dd73d5bfa05f829bf44cd8480627d5b387f8 (diff) | |
download | fastd-33ec56398316af14eec762406f21e649fcc3cbf2.tar fastd-33ec56398316af14eec762406f21e649fcc3cbf2.zip |
Limit resolve frequency
Diffstat (limited to 'src/peer.c')
-rw-r--r-- | src/peer.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; } } |