diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-13 18:21:17 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-04-13 18:21:17 +0200 |
commit | e628a01fffba231a1f0f729bdb509abcba6e6f0b (patch) | |
tree | 56e71649d6036116ea3d78a28af4f6876625ec72 /src/protocols | |
parent | 7cac6770e0b380d6e5f37b9fad71c9f7f15952ba (diff) | |
download | fastd-e628a01fffba231a1f0f729bdb509abcba6e6f0b.tar fastd-e628a01fffba231a1f0f729bdb509abcba6e6f0b.zip |
Add on-connect hook
Diffstat (limited to 'src/protocols')
-rw-r--r-- | src/protocols/ec25519_fhmqvc/handshake.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/protocols/ec25519_fhmqvc/handshake.c b/src/protocols/ec25519_fhmqvc/handshake.c index 6de47ef..27cb843 100644 --- a/src/protocols/ec25519_fhmqvc/handshake.c +++ b/src/protocols/ec25519_fhmqvc/handshake.c @@ -533,6 +533,9 @@ void fastd_protocol_ec25519_fhmqvc_handshake_init(fastd_context_t *ctx, const fa fastd_handshake_add(ctx, &buffer, RECORD_SENDER_HANDSHAKE_KEY, PUBLICKEYBYTES, &ctx->protocol_state->handshake_key.key.public); + if (!peer || !fastd_peer_is_established(peer)) + fastd_shell_command_exec(ctx, &ctx->conf->on_connect, peer, (local_addr && local_addr->sa.sa_family) ? local_addr : sock->bound_addr, remote_addr, NULL); + fastd_send_handshake(ctx, sock, local_addr, remote_addr, peer, buffer); } |