summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/peer.c b/src/peer.c
index 14af83c..324266a 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -133,7 +133,7 @@ static void reset_peer(fastd_context_t *ctx, fastd_peer_t *peer) {
free_socket(ctx, peer);
- memset(&peer->local_address, 0, sizeof(peer->local_address)),
+ memset(&peer->local_address, 0, sizeof(peer->local_address));
ctx->conf->protocol->reset_peer_state(ctx, peer);
@@ -158,6 +158,8 @@ static void setup_peer(fastd_context_t *ctx, fastd_peer_t *peer) {
else
peer->address = peer->config->address;
+ memset(&peer->local_address, 0, sizeof(peer->local_address));
+
peer->established = false;
peer->last_resolve = (struct timespec){0, 0};