Don't assume that a node has routerinfo.

We can end up in dirserv_orconn_tls_done() with a node missing
routerinfo in at least two cases -- command_process_certs_cell() and
connection_or_check_valid_tls_handshake() -- and probably more.
This commit is contained in:
Linus Nordberg 2012-05-08 14:53:59 +02:00 committed by Linus Nordberg
parent 631ec5c4fe
commit c1ff07440e

View File

@ -3284,10 +3284,9 @@ dirserv_orconn_tls_done(const char *address,
tor_assert(digest_rcvd);
node = node_get_mutable_by_id(digest_rcvd);
if (node == NULL)
if (node == NULL || node->ri == NULL)
return;
ri = node->ri;
tor_assert(ri);
if (!strcasecmp(address, ri->address) && or_port == ri->or_port) {
/* Found the right router. */