aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-11-18 17:18:40 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-11-18 17:18:40 +0100
commit8a876e394f7625f1f7d620370f0a8092d3cd73dc (patch)
tree868387451e13e5fd3af3a534498138d6b151ddaa /tunnel
parentinstaller: regard KB2921916 exits when prompted to be USEREXIT so fetcher doesn't mind (diff)
downloadwireguard-windows-8a876e394f7625f1f7d620370f0a8092d3cd73dc.tar.xz
wireguard-windows-8a876e394f7625f1f7d620370f0a8092d3cd73dc.zip
tunnel: mask self before giving routes to windows
Otherwise Windows complains. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel')
-rw-r--r--tunnel/addressconfig.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/tunnel/addressconfig.go b/tunnel/addressconfig.go
index c8b315e1..6aba9ce8 100644
--- a/tunnel/addressconfig.go
+++ b/tunnel/addressconfig.go
@@ -80,6 +80,7 @@ func configureInterface(family winipcfg.AddressFamily, conf *conf.Config, tun *t
foundDefault6 := false
for _, peer := range conf.Peers {
for _, allowedip := range peer.AllowedIPs {
+ allowedip.MaskSelf()
if (allowedip.Bits() == 32 && !haveV4Address) || (allowedip.Bits() == 128 && !haveV6Address) {
continue
}