summaryrefslogtreecommitdiffstats
path: root/src/protocol_ec25519_fhmqvc.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-05-03 00:01:36 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-05-03 00:01:36 +0200
commita3459bc67802779b7c2c3aa17ef6d6f2030c9d15 (patch)
treeee01bda188dea4759f732d20c1f44a7f38bc2a4b /src/protocol_ec25519_fhmqvc.c
parent2add52c1def4eaaa675e93676d44e2b3d4373a31 (diff)
downloadfastd-0.4-rc6.tar
fastd-0.4-rc6.zip
Critical fix: ignore disabled peers when searching peer key to avoid NULL dereferencev0.4-rc6
Diffstat (limited to 'src/protocol_ec25519_fhmqvc.c')
-rw-r--r--src/protocol_ec25519_fhmqvc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/protocol_ec25519_fhmqvc.c b/src/protocol_ec25519_fhmqvc.c
index fd4676f..659b4d3 100644
--- a/src/protocol_ec25519_fhmqvc.c
+++ b/src/protocol_ec25519_fhmqvc.c
@@ -506,6 +506,9 @@ static const fastd_peer_config* match_sender_key(fastd_context *ctx, const fastd
if (!peer_conf || fastd_peer_config_is_floating(peer_conf) || fastd_peer_config_is_dynamic(peer_conf)) {
fastd_peer_config *config;
for (config = ctx->conf->peers; config; config = config->next) {
+ if (!config->enabled || !config->protocol_config)
+ continue;
+
if (!fastd_peer_config_is_floating(config) && !fastd_peer_config_matches_dynamic(config, address))
continue;