diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-12-08 17:46:34 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-12-08 17:46:34 +0100 |
commit | 9a155e4c51e7c6af96b73a4e6e8e17ed37ee4532 (patch) | |
tree | 63d0ee65af908e0ccf7e5e9b8239863905bcccda /src/peer.c | |
parent | 6330d8abe044c26ca8d0c0246f9d075c53779782 (diff) | |
download | fastd-9a155e4c51e7c6af96b73a4e6e8e17ed37ee4532.tar fastd-9a155e4c51e7c6af96b73a4e6e8e17ed37ee4532.zip |
Revert "Fix crash occuring under certain circumstances on resolve failure"
This reverts commit 6330d8abe044c26ca8d0c0246f9d075c53779782.
Diffstat (limited to 'src/peer.c')
-rw-r--r-- | src/peer.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -366,7 +366,7 @@ bool fastd_peer_address_equal(const fastd_peer_address *addr1, const fastd_peer_ bool fastd_peer_claim_address(fastd_context *ctx, fastd_peer *new_peer, fastd_socket *sock, const fastd_peer_address *addr) { if (addr->sa.sa_family == AF_UNSPEC) { - if (new_peer->address.sa.sa_family != AF_UNSPEC) + if (fastd_peer_is_established(new_peer)) fastd_peer_reset(ctx, new_peer); } else { @@ -379,14 +379,14 @@ bool fastd_peer_claim_address(fastd_context *ctx, fastd_peer *new_peer, fastd_so break; if (!fastd_peer_is_floating(peer)) { - if (new_peer->address.sa.sa_family != AF_UNSPEC) + if (fastd_peer_is_established(new_peer)) fastd_peer_reset(ctx, new_peer); memset(&new_peer->address, 0, sizeof(fastd_peer_address)); return false; } - if (peer->address.sa.sa_family != AF_UNSPEC) + if (fastd_peer_is_established(peer)) fastd_peer_reset(ctx, peer); memset(&peer->address, 0, sizeof(fastd_peer_address)); |