mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Early bailout from log_addr_has_changed() if running as client
This commit is contained in:
parent
9ae3597540
commit
ffdfd39d4f
6
changes/bug26892
Normal file
6
changes/bug26892
Normal file
@ -0,0 +1,6 @@
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user