Commit 45742ce0 authored by Roger Dingledine's avatar Roger Dingledine
Browse files

Make directory servers include the X-Your-Address-Is: http header in

their responses even for begin_dir conns. Now clients who only ever use
begin_dir connections still have a way to learn their IP address. Should
fix bug 737. Reported by goldy.


svn:r15571
parent 158ee8ea
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2721,9 +2721,9 @@ connection_exit_connect_dir(edge_connection_t *exitconn)

  dirconn = TO_DIR_CONN(connection_new(CONN_TYPE_DIR, AF_INET));

  dirconn->_base.addr = 0x7f000001;
  dirconn->_base.addr = exitconn->_base.addr;
  dirconn->_base.port = 0;
  dirconn->_base.address = tor_strdup("Tor network");
  dirconn->_base.address = tor_strdup(circ->p_conn->_base.address);
  dirconn->_base.type = CONN_TYPE_DIR;
  dirconn->_base.purpose = DIR_PURPOSE_SERVER;
  dirconn->_base.state = DIR_CONN_STATE_SERVER_COMMAND_WAIT;