From 954f5029dfa17734dc408336ef710c192268e8a4 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sun, 4 Aug 2013 10:05:35 +0000 Subject: Fix immediate overwrite in the X-forwarded-for passing case. Thanks to Alexander Luetjen. --- ot_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ot_http.c b/ot_http.c index a14f950..dc8bd4e 100644 --- a/ot_http.c +++ b/ot_http.c @@ -401,11 +401,11 @@ static ssize_t http_handle_announce( const int64 sock, struct ot_workstruct *ws, OT_SETIP( &ws->peer, cookie->ip ); } else #endif + OT_SETIP( &ws->peer, cookie->ip ); ws->peer_id = NULL; ws->hash = NULL; - OT_SETIP( &ws->peer, cookie->ip ); OT_SETPORT( &ws->peer, &port ); OT_PEERFLAG( &ws->peer ) = 0; numwant = 50; -- cgit v1.2.3