Browse Source

Block address in block list

pull/864/head
Max Lv 8 years ago
parent
commit
7ee9290657
1 changed files with 2 additions and 1 deletions
  1. 3
      src/server.c

3
src/server.c

@ -1422,7 +1422,8 @@ accept_cb(EV_P_ ev_io *w, int revents)
if (acl) { if (acl) {
char *peer_name = get_peer_name(serverfd); char *peer_name = get_peer_name(serverfd);
if (peer_name != NULL) { 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)) { || (get_acl_mode() == WHITE_LIST && acl_match_host(peer_name) >= 0)) {
if (verbose) if (verbose)
LOGI("Access denied from %s", peer_name); LOGI("Access denied from %s", peer_name);

Loading…
Cancel
Save