diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-02-27 04:42:50 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-02-27 04:42:50 +0100 |
commit | ddb4831f065b6e539d33051fb4c94711e06ed72f (patch) | |
tree | 8c2e74da542cce596f68c4fcdfd0f3462e1a513e /src/peer.h | |
parent | 3fb7af313fbfef9e0b8195cc44b176dd3fccb15e (diff) | |
download | fastd-ddb4831f065b6e539d33051fb4c94711e06ed72f.tar fastd-ddb4831f065b6e539d33051fb4c94711e06ed72f.zip |
Don't set the peer address for temporary peers before the session is actually established
Doing so could lead to duplicate address entries in different peers, causing
very strange behaviour.
Add additional parameters for the local and the peer address to
fastd_shell_exec() to allow the on-verify script to use this information
nevertheless.
Diffstat (limited to 'src/peer.h')
-rw-r--r-- | src/peer.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -91,8 +91,8 @@ bool fastd_peer_config_equal(const fastd_peer_config_t *peer1, const fastd_peer_ void fastd_peer_reset(fastd_context_t *ctx, fastd_peer_t *peer); void fastd_peer_delete(fastd_context_t *ctx, fastd_peer_t *peer); fastd_peer_t* fastd_peer_add(fastd_context_t *ctx, fastd_peer_config_t *conf); -fastd_peer_t* fastd_peer_add_temporary(fastd_context_t *ctx, fastd_socket_t *sock, const fastd_peer_address_t *addr); -bool fastd_peer_verify_temporary(fastd_context_t *ctx, fastd_peer_t *peer); +fastd_peer_t* fastd_peer_add_temporary(fastd_context_t *ctx); +bool fastd_peer_verify_temporary(fastd_context_t *ctx, fastd_peer_t *peer, const fastd_peer_address_t *local_addr, const fastd_peer_address_t *peer_addr); void fastd_peer_enable_temporary(fastd_context_t *ctx, fastd_peer_t *peer); void fastd_peer_set_established(fastd_context_t *ctx, fastd_peer_t *peer); bool fastd_peer_may_connect(fastd_context_t *ctx, fastd_peer_t *peer); |