summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-07-29 19:28:51 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-07-29 19:28:51 +0200
commitdff92dd471fe805ff562670179065de579967542 (patch)
tree3c5bf34e7124c26e40fc34e45ee242395ea6b592 /src
parent35cdc5b562dc2c8c843637cd88cf5404c5efc538 (diff)
downloadfastd-dff92dd471fe805ff562670179065de579967542.tar
fastd-dff92dd471fe805ff562670179065de579967542.zip
Fix assertion fail on key renewal handshakes with peers without remotes
Diffstat (limited to 'src')
-rw-r--r--src/fastd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fastd.c b/src/fastd.c
index 37e841f..22f292f 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -446,10 +446,10 @@ static inline void schedule_handshake(fastd_context_t *ctx, fastd_peer_t *peer)
}
static void send_handshake(fastd_context_t *ctx, fastd_peer_t *peer) {
- if (!peer->next_remote)
- exit_bug(ctx, "send_handshake: no remote");
-
if (!fastd_peer_is_established(peer)) {
+ if (!peer->next_remote)
+ exit_bug(ctx, "send_handshake: no remote");
+
fastd_peer_claim_address(ctx, peer, NULL, NULL, &peer->next_remote->address);
fastd_peer_reset_socket(ctx, peer);
}