aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/conf
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-08-03 19:08:00 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-08-03 19:10:30 +0200
commit22be5b26d95f8d8c32e5bf7dbca214f799cbc103 (patch)
tree1567f92000d55595cc098f90ce712b71fe133ca5 /conf
parentconf: do not resolve empty endpoint (diff)
downloadwireguard-windows-22be5b26d95f8d8c32e5bf7dbca214f799cbc103.tar.xz
wireguard-windows-22be5b26d95f8d8c32e5bf7dbca214f799cbc103.zip
conf: work around erroneous hasendpoint flag
Revert me for wgnt 0.3. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'conf')
-rw-r--r--conf/parser.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/conf/parser.go b/conf/parser.go
index 2a1c0894..d3073464 100644
--- a/conf/parser.go
+++ b/conf/parser.go
@@ -559,7 +559,7 @@ func FromDriverConfiguration(interfaze *driver.Interface, existingConfig *Config
if p.Flags&driver.PeerHasPresharedKey != 0 {
peer.PresharedKey = p.PresharedKey
}
- if p.Flags&driver.PeerHasEndpoint != 0 {
+ if p.Flags&driver.PeerHasEndpoint != 0 && p.Endpoint.Family != 0 {
peer.Endpoint.Port = p.Endpoint.Port()
peer.Endpoint.Host = p.Endpoint.IP().String()
}