From e5e67212fe07bc0672e887b4caa796d383bb8a25 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 25 Jun 2014 21:43:00 +0100 Subject: [PATCH 1/1] site: transport peers: Use source of NAK packets as reply address If we get a NAK from our current peer and initiate a key exchange, we should take the source address of the NAK as a hint for the peer's public address. Signed-off-by: Ian Jackson --- site.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site.c b/site.c index 49e04cf..c8206d0 100644 --- a/site.c +++ b/site.c @@ -1696,7 +1696,7 @@ static bool_t site_incoming(void *sst, struct buffer_if *buf, because our peer's forgotten the key */ if (get_uint32(buf->start+4)==st->current.remote_session_id) { bool_t initiated; - initiated = initiate_key_setup(st,"received a NAK",0); + initiated = initiate_key_setup(st,"received a NAK",source); if (!initiated) generate_send_prod(st,source); } else { slog(st,LOG_SEC,"bad incoming NAK"); -- 2.30.2