From d107f9ecdb76d6503bba1288ea2bc16052b62f16 Mon Sep 17 00:00:00 2001 From: Mygod Date: Mon, 30 Jul 2018 23:48:54 +0800 Subject: [PATCH] More bugfix --- src/local.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/local.c b/src/local.c index 1b4db164..11091d59 100644 --- a/src/local.c +++ b/src/local.c @@ -524,19 +524,17 @@ server_handshake(EV_P_ ev_io *w, buffer_t *buf) goto not_bypass; } } - if (resolved) { - int ip_match = acl_match_host(ip); - switch (get_acl_mode()) { - case BLACK_LIST: - if (ip_match > 0) - bypass = 1; // bypass IPs in black list - break; - case WHITE_LIST: - bypass = 1; - if (ip_match < 0) - bypass = 0; // proxy IPs in white list - break; - } + int ip_match = acl_match_host(ip); + switch (get_acl_mode()) { + case BLACK_LIST: + if (ip_match > 0) + bypass = 1; // bypass IPs in black list + break; + case WHITE_LIST: + bypass = 1; + if (ip_match < 0) + bypass = 0; // proxy IPs in white list + break; } }