diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-05-03 00:01:36 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-05-03 00:01:36 +0200 |
commit | a3459bc67802779b7c2c3aa17ef6d6f2030c9d15 (patch) | |
tree | ee01bda188dea4759f732d20c1f44a7f38bc2a4b | |
parent | 2add52c1def4eaaa675e93676d44e2b3d4373a31 (diff) | |
download | fastd-a3459bc67802779b7c2c3aa17ef6d6f2030c9d15.tar fastd-a3459bc67802779b7c2c3aa17ef6d6f2030c9d15.zip |
Critical fix: ignore disabled peers when searching peer key to avoid NULL dereferencev0.4-rc6
-rw-r--r-- | src/protocol_ec25519_fhmqvc.c | 3 |
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; |