summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2019-05-14 13:49:25 +0200
committerAndrej Mihajlov <and@mullvad.net>2019-05-14 14:18:53 +0200
commit46b0f3797fdeb2a43e1821f82dc70ae2078683ac (patch)
tree1aeb31043f4283df7a4d8d592c2269737e91fbe9
parent1a2c29203529f4317e9135ffcedb2859ad79043e (diff)
downloadmullvadvpn-46b0f3797fdeb2a43e1821f82dc70ae2078683ac.tar.xz
mullvadvpn-46b0f3797fdeb2a43e1821f82dc70ae2078683ac.zip
Remove redundant call to af()
-rw-r--r--talpid-core/src/firewall/macos.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/talpid-core/src/firewall/macos.rs b/talpid-core/src/firewall/macos.rs
index 04dfa7c8d2..6e36c1b7db 100644
--- a/talpid-core/src/firewall/macos.rs
+++ b/talpid-core/src/firewall/macos.rs
@@ -252,10 +252,7 @@ impl Firewall {
let mut rules = vec![];
for net in &*super::ALLOWED_LAN_NETS {
let mut rule_builder = self.create_rule_builder(FilterRuleAction::Pass);
- rule_builder.quick(true).af(match net {
- IpNetwork::V4(_) => pfctl::AddrFamily::Ipv4,
- IpNetwork::V6(_) => pfctl::AddrFamily::Ipv6,
- });
+ rule_builder.quick(true);
let allow_out = rule_builder
.direction(pfctl::Direction::Out)
.from(pfctl::Ip::Any)
@@ -274,10 +271,6 @@ impl Firewall {
.create_rule_builder(FilterRuleAction::Pass)
.quick(true)
.direction(pfctl::Direction::Out)
- .af(match multicast_net {
- IpNetwork::V4(_) => pfctl::AddrFamily::Ipv4,
- IpNetwork::V6(_) => pfctl::AddrFamily::Ipv6,
- })
.to(pfctl::Ip::from(*multicast_net))
.build()?;
rules.push(allow_multicast_out);