diff options
-rw-r--r-- | src/protocol_ec25519_fhmqvc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/protocol_ec25519_fhmqvc.c b/src/protocol_ec25519_fhmqvc.c index e4a0e93..719482c 100644 --- a/src/protocol_ec25519_fhmqvc.c +++ b/src/protocol_ec25519_fhmqvc.c @@ -162,6 +162,12 @@ static void protocol_peer_configure(fastd_context *ctx, fastd_peer_config *peer_ return; } + if (memcmp(key.p, ctx->conf->protocol_config->public_key.p, 32) == 0) { + pr_verbose(ctx, "found own key as `%s', ignoring peer", peer_conf->name); + peer_conf->enabled = false; + return; + } + peer_conf->protocol_config = malloc(sizeof(fastd_protocol_peer_config)); peer_conf->protocol_config->public_key = key; } |