mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Resolve a crash when running as dirauth
When we're asked for our own descriptor, don't crash.
This commit is contained in:
parent
c58f4a8652
commit
c98faa1a23
4
changes/bridgeauth_crash
Normal file
4
changes/bridgeauth_crash
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Major bugfixes:
|
||||||
|
- Don't crash when we, as the bridge authority, are asked for our own
|
||||||
|
descriptor. Bugfix on 0.2.3.7-alpha, reported by Lucky.
|
||||||
|
|
@ -3590,8 +3590,9 @@ connection_dirserv_add_servers_to_outbuf(dir_connection_t *conn)
|
|||||||
if (options->BridgeAuthoritativeDir && by_fp) {
|
if (options->BridgeAuthoritativeDir && by_fp) {
|
||||||
const routerinfo_t *router =
|
const routerinfo_t *router =
|
||||||
router_get_by_id_digest(sd->identity_digest);
|
router_get_by_id_digest(sd->identity_digest);
|
||||||
tor_assert(router);
|
/* router can be NULL here when the bridge auth is asked for its own
|
||||||
if (router->purpose == ROUTER_PURPOSE_BRIDGE)
|
* descriptor. */
|
||||||
|
if (router && router->purpose == ROUTER_PURPOSE_BRIDGE)
|
||||||
rep_hist_note_desc_served(sd->identity_digest);
|
rep_hist_note_desc_served(sd->identity_digest);
|
||||||
}
|
}
|
||||||
body = signed_descriptor_get_body(sd);
|
body = signed_descriptor_get_body(sd);
|
||||||
|
Loading…
Reference in New Issue
Block a user