]> git.ipfire.org Git - thirdparty/opentracker.git/commitdiff
Fix immediate overwrite in the X-forwarded-for passing case. Thanks to Alexander...
authorerdgeist <>
Sun, 4 Aug 2013 10:05:35 +0000 (10:05 +0000)
committererdgeist <>
Sun, 4 Aug 2013 10:05:35 +0000 (10:05 +0000)
ot_http.c

index a14f950c889e1fabea43999a640785d522fa1ea9..dc8bd4e34cff2b3d8ec63ffbf6a50e56e3ded56f 100644 (file)
--- 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;