From 7ee92906578e926c998958c276a33aba4a448460 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Sat, 1 Oct 2016 07:14:52 +0800 Subject: [PATCH] Block address in block list --- src/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 52fd21b3..5f720c74 100644 --- a/src/server.c +++ b/src/server.c @@ -1422,7 +1422,8 @@ accept_cb(EV_P_ ev_io *w, int revents) if (acl) { char *peer_name = get_peer_name(serverfd); if (peer_name != NULL) { - if ((get_acl_mode() == BLACK_LIST && acl_match_host(peer_name) == 1) + if (check_block_list(peer_name, 0) + || (get_acl_mode() == BLACK_LIST && acl_match_host(peer_name) == 1) || (get_acl_mode() == WHITE_LIST && acl_match_host(peer_name) >= 0)) { if (verbose) LOGI("Access denied from %s", peer_name);