Skip to content

Commit

Permalink
fix: ip v4 filter typo and also clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cavivie committed Apr 14, 2024
1 parent b6d11a6 commit e868594
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl<'a> IpFilters<'a> {
macro_rules! non_broadcast {
($addr:ident) => {
match $addr {
IpAddr::V4(a) => !(a.is_broadcast() || a.is_multicast() || a.is_multicast()),
IpAddr::V4(a) => !(a.is_broadcast() || a.is_multicast() || a.is_unspecified()),
IpAddr::V6(a) => !(a.is_multicast() || a.is_unspecified()),
}
};
Expand All @@ -47,7 +47,7 @@ impl<'a> IpFilters<'a> {
}

pub fn add_all<I: IntoIterator<Item = IpFilter<'a>>>(&mut self, filters: I) {
self.filters.extend(filters.into_iter());
self.filters.extend(filters);
}

pub fn is_allowed(&self, src: &IpAddr, dst: &IpAddr) -> bool {
Expand Down

0 comments on commit e868594

Please sign in to comment.