Don't cloak already cloaked hostname when using METADATA
A client for which a METADATA command has been received from one of its peers got the client flag "M" set. So it's safe to assume that such a client gets "METADATA host" commands for its cloaked hostname and the server must not cloak the hostname on its own, even when the client mode "+x" is set.
This commit is contained in:
parent
35ed57e6c1
commit
44b7ff02fd
|
@ -702,9 +702,16 @@ Client_HostnameCloaked(CLIENT *Client)
|
||||||
|
|
||||||
assert(Client != NULL);
|
assert(Client != NULL);
|
||||||
|
|
||||||
|
/* Client isn't cloaked at all, return real hostname: */
|
||||||
if (!Client_HasMode(Client, 'x'))
|
if (!Client_HasMode(Client, 'x'))
|
||||||
return Client_Hostname(Client);
|
return Client_Hostname(Client);
|
||||||
|
|
||||||
|
/* Client has received METADATA command, so it got the eventually
|
||||||
|
* cloaked hostname set correctly and this server doesn't need
|
||||||
|
* to cloak it on its own: */
|
||||||
|
if (strchr(Client_Flags(Client), 'M'))
|
||||||
|
return Client_Hostname(Client);
|
||||||
|
|
||||||
/* Do simple mapping to the server ID? */
|
/* Do simple mapping to the server ID? */
|
||||||
if (!*Conf_CloakHostModeX)
|
if (!*Conf_CloakHostModeX)
|
||||||
return Client_ID(Client->introducer);
|
return Client_ID(Client->introducer);
|
||||||
|
|
Loading…
Reference in New Issue