diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2018-07-26 17:49:27 +0300 |
---|---|---|
committer | rl1987 <rl1987@sdf.lonestar.org> | 2018-07-26 17:49:27 +0300 |
commit | ffdfd39d4fc693795f1e3fd222b676fe053681be (patch) | |
tree | fa7aca8295f76788b3242be46c596c2048c37065 /src/feature/relay | |
parent | 9ae35975402a823a420cd5efb81a1c3a76f6c4d6 (diff) | |
download | tor-ffdfd39d4fc693795f1e3fd222b676fe053681be.tar.gz tor-ffdfd39d4fc693795f1e3fd222b676fe053681be.zip |
Early bailout from log_addr_has_changed() if running as client
Diffstat (limited to 'src/feature/relay')
-rw-r--r-- | src/feature/relay/router.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 973d3e1100..0cc4887232 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -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) |