Log message when a client tries to connect to an invalid hostname is incorrect
In connection_ap_handshake_rewrite_and_attach
:
addresstype = parse_extended_hostname(socks->address,
remapped_to_exit || options->AllowDotExit);
if (addresstype == BAD_HOSTNAME) {
log_warn(LD_APP, "Invalid onion hostname %s; rejecting",
safe_str_client(socks->address));
parse_extended_hostname
also returns BAD_HOSTNAME
for .exit
hostnames when AllowDotExit is off.
Also, parse_extended_hostname
's documentation comment does not mention BAD_HOSTNAME
.