MXS-2546 Add DNS-resolving to topology detection

When matching hostnames between MaxScale server configuration and the
SHOW SLAVE STATUS-output, use DNS-resolution if a simple string comparison
doesn't find an answer. Results of the resolution are saved to avoid
repeating the operation for the same address.
This commit is contained in:
Esa Korhonen
2019-06-06 11:20:34 +03:00
parent 5df1f2561c
commit d4b712ae84
6 changed files with 140 additions and 7 deletions

View File

@ -766,7 +766,7 @@ json_t* session_json_data(const Session* session, const char* host, bool rdns)
auto remote = session->client_dcb->remote;
if (rdns)
{
maxbase::reverse_dns(remote, &result_address);
maxbase::reverse_name_lookup(remote, &result_address);
}
else
{