summaryrefslogtreecommitdiffstats
path: root/src/protocols/ec25519_fhmqvc
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-19 00:10:48 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-19 00:21:38 +0200
commit35a18b1dea21f006b38694dcf5c99f817411ad4d (patch)
treec6922a55085eba524ad9a997816429c6437b7430 /src/protocols/ec25519_fhmqvc
parent21ade840c989e9fcebef63e2999f5c31843c47b6 (diff)
downloadfastd-35a18b1dea21f006b38694dcf5c99f817411ad4d.tar
fastd-35a18b1dea21f006b38694dcf5c99f817411ad4d.zip
Create peer structures for disabled peers as well
We have a 1:1 association between peers and peer configs now.
Diffstat (limited to 'src/protocols/ec25519_fhmqvc')
-rw-r--r--src/protocols/ec25519_fhmqvc/handshake.c3
1 files changed, 3 insertions, 0 deletions
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;