--- /dev/null
+ o Major bugfixes:
+
+ - When a relay is extending a circuit to a bridge, it needs to send a
+ NETINFO cell, even when the bridge hasn't sent an AUTH_CHALLENGE
+ cell. Fixes bug 9546; bugfix on ????.
/* XXX maybe act on my_apparent_addr, if the source is sufficiently
* trustworthy. */
+ if (! chan->conn->handshake_state->sent_netinfo) {
+ /* If we were prepared to authenticate, but we never got an AUTH_CHALLENGE
+ * cell, then we would not previously have sent a NETINFO cell. Do so
+ * now. */
+ if (connection_or_send_netinfo(chan->conn) < 0) {
+ connection_or_close_for_error(chan->conn, 0);
+ return;
+ }
+ }
+
if (connection_or_set_state_open(chan->conn) < 0) {
log_fn(LOG_PROTOCOL_WARN, LD_OR,
"Got good NETINFO cell from %s:%d; but "
tor_assert(conn->handshake_state);
+ if (conn->handshake_state->sent_netinfo) {
+ log_warn(LD_BUG, "Attempted to send an extra netinfo cell on a connection "
+ "where we already sent one.");
+ return 0;
+ }
+
memset(&cell, 0, sizeof(cell_t));
cell.command = CELL_NETINFO;
}
conn->handshake_state->digest_sent_data = 0;
+ conn->handshake_state->sent_netinfo = 1;
connection_or_write_cell_to_buf(&cell, conn);
return 0;
/* True iff we've received valid authentication to some identity. */
unsigned int authenticated : 1;
+ /* True iff we have sent a netinfo cell */
+ unsigned int sent_netinfo : 1;
+
/** True iff we should feed outgoing cells into digest_sent and
* digest_received respectively.
*