From: erdgeist <> Date: Sun, 4 Aug 2013 10:05:35 +0000 (+0000) Subject: Fix immediate overwrite in the X-forwarded-for passing case. Thanks to Alexander... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=954f5029dfa17734dc408336ef710c192268e8a4;p=thirdparty%2Fopentracker.git Fix immediate overwrite in the X-forwarded-for passing case. Thanks to Alexander Luetjen. --- 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;