Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/acl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ impl AccessControl {

pub fn check_ip_in_proxy_list(&self, ip: &IpAddr) -> bool {
match self.mode {
Mode::BlackList => self.black_list.check_ip_matched(ip),
Mode::WhiteList => !self.white_list.check_ip_matched(ip),
Mode::BlackList => !self.black_list.check_ip_matched(ip),
Mode::WhiteList => self.white_list.check_ip_matched(ip),
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ impl Context {
let mut reverse_lookup_cache = self.reverse_lookup_cache.lock();
// if a qname is found
if let Some(forward) = reverse_lookup_cache.get(ip) {
!*forward
*forward
} else {
a.check_ip_in_proxy_list(ip)
}
Expand Down