diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-11 15:50:43 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-11 15:50:43 +0200 |
commit | a45a313422efa33f261cb1b53a08646a6b3ab947 (patch) | |
tree | abe0d81b6dba97106b1016722e210f02a0168733 /src/protocols | |
parent | e5a8f900352b242860ac3dd4e3b39c7297169480 (diff) | |
download | fastd-a45a313422efa33f261cb1b53a08646a6b3ab947.tar fastd-a45a313422efa33f261cb1b53a08646a6b3ab947.zip |
Improve shell command config handling
Diffstat (limited to 'src/protocols')
-rw-r--r-- | src/protocols/ec25519_fhmqvc/handshake.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/protocols/ec25519_fhmqvc/handshake.c b/src/protocols/ec25519_fhmqvc/handshake.c index a8bde30..6de47ef 100644 --- a/src/protocols/ec25519_fhmqvc/handshake.c +++ b/src/protocols/ec25519_fhmqvc/handshake.c @@ -486,8 +486,12 @@ bool fastd_protocol_ec25519_fhmqvc_peer_check_temporary(fastd_context_t *ctx, fa return true; } +static inline bool allow_unknown(fastd_context_t *ctx) { + return fastd_shell_command_isset(&ctx->conf->on_verify); +} + static inline fastd_peer_t* add_temporary(fastd_context_t *ctx, const fastd_peer_address_t *local_addr, const fastd_peer_address_t *remote_addr, const unsigned char key[32]) { - if (!fastd_peer_allow_unknown(ctx)) { + if (!allow_unknown(ctx)) { pr_debug(ctx, "ignoring handshake from %I (unknown key)", remote_addr); return NULL; } |