| 4700 | |
| 4701 | |
| 4702 | static bool compare_hostname(const acl_host_and_ip *host, const char *hostname, |
| 4703 | const char *ip) |
| 4704 | { |
| 4705 | long tmp; |
| 4706 | if (host->ip_mask && ip && calc_ip(ip,&tmp,'\0')) |
| 4707 | { |
| 4708 | return (tmp & host->ip_mask) == host->ip; |
| 4709 | } |
| 4710 | return (!host->hostname || |
| 4711 | (hostname && !wild_case_compare(system_charset_info, |
| 4712 | hostname, host->hostname)) || |
| 4713 | (ip && !wild_compare(ip, host->hostname, 0))); |
| 4714 | } |
| 4715 | |
| 4716 | /** |
| 4717 | Check if the given host name needs to be resolved or not. |
no test coverage detected