Skip to content
Snippets Groups Projects
Commit ffdfd39d authored by rl1987's avatar rl1987
Browse files

Early bailout from log_addr_has_changed() if running as client

parent 9ae35975
No related branches found
No related tags found
No related merge requests found
o Minor bugfixes (logging):
- As a precaution, do an early return from
log_addr_has_changed() if Tor is running as client. Also,
log a stack trace for debugging as this function should only
be called when Tor runs as server. Fixes bug 26892;
bugfix on 0.1.1.9-alpha.
......@@ -2686,6 +2686,9 @@ log_addr_has_changed(int severity,
char addrbuf_prev[TOR_ADDR_BUF_LEN];
char addrbuf_cur[TOR_ADDR_BUF_LEN];
if (BUG(!server_mode(get_options())))
return;
if (tor_addr_to_str(addrbuf_prev, prev, sizeof(addrbuf_prev), 1) == NULL)
strlcpy(addrbuf_prev, "???", TOR_ADDR_BUF_LEN);
if (tor_addr_to_str(addrbuf_cur, cur, sizeof(addrbuf_cur), 1) == NULL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment