Skip to content

Commit

Permalink
Fix allows_addr() bug related to empty CIDR lists.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvogel committed Sep 21, 2023
1 parent 835fd0a commit bb7ca56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/remote_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl RemoteConnectionFilter {
pub fn allows_addr(&self, addr: &IpAddr) -> bool {
match self.cidr_list.iter().find(|c| c.contains(*addr)) {
Some(_) => true,
None => false,
None => self.cidr_list.is_empty(),
}
}
}
Expand Down

0 comments on commit bb7ca56

Please sign in to comment.