diff options
Diffstat (limited to 'src/peer_hashtable.c')
-rw-r--r-- | src/peer_hashtable.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/peer_hashtable.c b/src/peer_hashtable.c index 475d7f9..b191f63 100644 --- a/src/peer_hashtable.c +++ b/src/peer_hashtable.c @@ -88,6 +88,9 @@ static size_t peer_address_bucket(const fastd_peer_address_t *addr) { The peer address must not change while the peer is part of the table. */ void fastd_peer_hashtable_insert(fastd_peer_t *peer) { + if (!peer->address.sa.sa_family) + return; + size_t b = peer_address_bucket(&peer->address); VECTOR_ADD(ctx.peer_addr_ht[b], peer); } |