diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-04-24 13:10:32 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-04-24 13:10:32 +0200 |
commit | 1d2444f6264c3b3d4bbf4534b39e2159e71039b0 (patch) | |
tree | 47b74e77be0ef3962277cb98135be1503c93071b | |
parent | adaedb9299c77e18150b685a96d51b1ce67ec423 (diff) | |
download | fastd-1d2444f6264c3b3d4bbf4534b39e2159e71039b0.tar fastd-1d2444f6264c3b3d4bbf4534b39e2159e71039b0.zip |
Initialize local address on peer creation
-rw-r--r-- | src/peer.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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}; |