aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/service/firewall/helpers.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-03 22:31:28 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-03 22:31:28 +0200
commitbccc3143be26cdf886b30552bccaaf04c6436257 (patch)
tree908077471349f7a568df529ea2c0e236f7e249b7 /service/firewall/helpers.go
parentui: fix thundering herd problem in importing/deleting (diff)
downloadwireguard-windows-bccc3143be26cdf886b30552bccaaf04c6436257.tar.xz
wireguard-windows-bccc3143be26cdf886b30552bccaaf04c6436257.zip
firewall: block dns before allowing localhost
This prevents DNS leaks from people who have a localhost resolver doing something funky. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'service/firewall/helpers.go')
-rw-r--r--service/firewall/helpers.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/service/firewall/helpers.go b/service/firewall/helpers.go
index 5945d69a..f5cab009 100644
--- a/service/firewall/helpers.go
+++ b/service/firewall/helpers.go
@@ -177,17 +177,10 @@ func createWtFwpmDisplayData0(name, description string) (*wtFwpmDisplayData0, er
}, nil
}
-func filterWeightMax() wtFwpValue0 {
+func filterWeight(weight uint8) wtFwpValue0 {
return wtFwpValue0{
_type: cFWP_UINT8,
- value: 15,
- }
-}
-
-func filterWeightMin() wtFwpValue0 {
- return wtFwpValue0{
- _type: cFWP_UINT8,
- value: 0,
+ value: uintptr(weight),
}
}