mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Merge branch 'bug4438-v2'
This commit is contained in:
commit
461771ebbc
6
changes/bug4438
Normal file
6
changes/bug4438
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- Fix a dirauth-only exit on sighup that could happen during some
|
||||||
|
configuration state transitions. We now don't treat it as a fatal
|
||||||
|
error when the new descriptor we just generated in init_keys
|
||||||
|
isn't accepted. Fixes bug 4438; bugfix on 0.2.1.9-alpha.
|
||||||
|
|
@ -651,15 +651,27 @@ init_keys(void)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (mydesc) {
|
if (mydesc) {
|
||||||
|
was_router_added_t added;
|
||||||
ri = router_parse_entry_from_string(mydesc, NULL, 1, 0, NULL);
|
ri = router_parse_entry_from_string(mydesc, NULL, 1, 0, NULL);
|
||||||
if (!ri) {
|
if (!ri) {
|
||||||
log_err(LD_GENERAL,"Generated a routerinfo we couldn't parse.");
|
log_err(LD_GENERAL,"Generated a routerinfo we couldn't parse.");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!WRA_WAS_ADDED(dirserv_add_descriptor(ri, &m, "self"))) {
|
added = dirserv_add_descriptor(ri, &m, "self");
|
||||||
log_err(LD_GENERAL,"Unable to add own descriptor to directory: %s",
|
if (!WRA_WAS_ADDED(added)) {
|
||||||
m?m:"<unknown error>");
|
if (!WRA_WAS_OUTDATED(added)) {
|
||||||
return -1;
|
log_err(LD_GENERAL, "Unable to add own descriptor to directory: %s",
|
||||||
|
m?m:"<unknown error>");
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
/* If the descriptor was outdated, that's ok. This can happen
|
||||||
|
* when some config options are toggled that affect workers, but
|
||||||
|
* we don't really need new keys yet so the descriptor doesn't
|
||||||
|
* change and the old one is still fresh. */
|
||||||
|
log_info(LD_GENERAL, "Couldn't add own descriptor to directory "
|
||||||
|
"after key init: %s. This is usually not a problem.",
|
||||||
|
m?m:"<unknown error>");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user