[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r8553: Bugfix: when we tunnel our dir fetches via tor, don't believ (tor/trunk/src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r8553: Bugfix: when we tunnel our dir fetches via tor, don't believ (tor/trunk/src/or)
- From: arma@xxxxxxxx
- Date: Sat, 30 Sep 2006 16:14:16 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sat, 30 Sep 2006 16:14:23 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: arma
Date: 2006-09-30 16:14:15 -0400 (Sat, 30 Sep 2006)
New Revision: 8553
Modified:
tor/trunk/src/or/directory.c
Log:
Bugfix: when we tunnel our dir fetches via tor, don't believe
the X-Forwarded-For header.
Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c 2006-09-30 20:07:37 UTC (rev 8552)
+++ tor/trunk/src/or/directory.c 2006-09-30 20:14:15 UTC (rev 8553)
@@ -837,7 +837,6 @@
int skewed=0;
int allow_partial = conn->_base.purpose == DIR_PURPOSE_FETCH_SERVERDESC;
int was_compressed=0;
- char *guess;
switch (fetch_from_buf_http(conn->_base.inbuf,
&headers, MAX_HEADERS_SIZE,
@@ -871,10 +870,12 @@
escaped(reason));
/* now check if it's got any hints for us about our IP address. */
- guess = http_get_header(headers, X_ADDRESS_HEADER);
- if (guess) {
- router_new_address_suggestion(guess);
- tor_free(guess);
+ if (conn->dirconn_direct) {
+ char *guess = http_get_header(headers, X_ADDRESS_HEADER);
+ if (guess) {
+ router_new_address_suggestion(guess);
+ tor_free(guess);
+ }
}
if (date_header > 0) {