Save time when domain name contains wildcard '%'

This commit is contained in:
陈金栋
2016-11-02 19:35:51 +08:00
committed by 陈金栋
parent fa2a667195
commit 8edd0d3bae

View File

@ -61,6 +61,12 @@ setipaddress(struct in_addr *a, char *p)
hint.ai_socktype = SOCK_STREAM; hint.ai_socktype = SOCK_STREAM;
if (strchr(p, '%') != NULL)
{
MXS_INFO("Host %s contains wildcard, return", p);
return 0;
}
/* /*
* This is for the listening socket, matching INADDR_ANY only for now. * This is for the listening socket, matching INADDR_ANY only for now.
* For future specific addresses bind, a dedicated routine woulbd be better * For future specific addresses bind, a dedicated routine woulbd be better