From 8edd0d3baee8e5b0ad816777819237e66d7fab1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=87=91=E6=A0=8B?= Date: Wed, 2 Nov 2016 19:35:51 +0800 Subject: [PATCH] Save time when domain name contains wildcard '%' --- server/core/gw_utils.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/core/gw_utils.c b/server/core/gw_utils.c index ccf2a12b2..a8cbc3e7b 100644 --- a/server/core/gw_utils.c +++ b/server/core/gw_utils.c @@ -61,6 +61,12 @@ setipaddress(struct in_addr *a, char *p) 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. * For future specific addresses bind, a dedicated routine woulbd be better