diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-03-08 22:07:02 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-03-08 22:07:02 +0100 |
commit | 103133c2fc7110085bbb730a71c762f6759e84e9 (patch) | |
tree | c98267c41ebe08c1157de6fbb8f637aec78df0d2 /src/fastd.h | |
parent | 56255a15a35650098c2358107e2dc4f21df43241 (diff) | |
download | fastd-103133c2fc7110085bbb730a71c762f6759e84e9.tar fastd-103133c2fc7110085bbb730a71c762f6759e84e9.zip |
Handle duplicate keys
When two peers are configured with the same key, disable both. When a temporary
peer's key is configured, delete the temporary key.
Diffstat (limited to 'src/fastd.h')
-rw-r--r-- | src/fastd.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fastd.h b/src/fastd.h index f8d51dd..11f6dfb 100644 --- a/src/fastd.h +++ b/src/fastd.h @@ -68,6 +68,8 @@ struct fastd_protocol { fastd_protocol_config_t* (*init)(fastd_context_t *ctx); void (*peer_configure)(fastd_context_t *ctx, fastd_peer_config_t *peer_conf); + bool (*peer_check)(fastd_context_t *ctx, fastd_peer_config_t *peer_conf); + bool (*peer_check_temporary)(fastd_context_t *ctx, fastd_peer_t *peer); void (*handshake_init)(fastd_context_t *ctx, const fastd_socket_t *sock, const fastd_peer_address_t *address, fastd_peer_t *peer); void (*handshake_handle)(fastd_context_t *ctx, fastd_socket_t *sock, const fastd_peer_address_t *address, fastd_peer_t *peer, const fastd_handshake_t *handshake, const fastd_method_t *method); |