From 35a18b1dea21f006b38694dcf5c99f817411ad4d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 19 Aug 2014 00:10:48 +0200 Subject: Create peer structures for disabled peers as well We have a 1:1 association between peers and peer configs now. --- src/protocols/ec25519_fhmqvc/handshake.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/protocols') diff --git a/src/protocols/ec25519_fhmqvc/handshake.c b/src/protocols/ec25519_fhmqvc/handshake.c index 498a6fd..86f9f9e 100644 --- a/src/protocols/ec25519_fhmqvc/handshake.c +++ b/src/protocols/ec25519_fhmqvc/handshake.c @@ -439,6 +439,9 @@ static fastd_peer_t* find_sender_key(const fastd_peer_address_t *address, const for (i = 0; i < VECTOR_LEN(ctx.peers); i++) { fastd_peer_t *peer = VECTOR_INDEX(ctx.peers, i); + if (!fastd_peer_is_enabled(peer)) + continue; + if (memcmp(&peer->config->protocol_config->public_key, key, PUBLICKEYBYTES) == 0) { if (!fastd_peer_matches_address(peer, address)) { errno = EPERM; -- cgit v1.2.3