Fixes bug 34131; bugfix on 0.4.3.1-alpha.
--- /dev/null
+ o Minor bugfixes (logging):
+ - Fix a logic error in a log message about whether an address was
+ invalid. Previously, the code would never report that onion addresses
+ were onion addresses. Fixes bug 34131; bugfix on 0.4.3.1-alpha.
failed:
/* otherwise, return to previous state and return 0 */
*s = '.';
+ const bool is_onion = (*type_out == ONION_V2_HOSTNAME) ||
+ (*type_out == ONION_V3_HOSTNAME);
log_warn(LD_APP, "Invalid %shostname %s; rejecting",
- (*type_out == (ONION_V2_HOSTNAME || ONION_V3_HOSTNAME) ? "onion " : ""),
- safe_str_client(address));
+ is_onion ? "onion " : "",
+ safe_str_client(address));
return false;
}