summaryrefslogtreecommitdiffhomepage
path: root/conn.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-18 05:02:35 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-18 05:02:35 +0200
commit125976edcec65265d9ea3ca38a9826c71b4a88d9 (patch)
tree388dfcd6e63ba934873e8c347349d9952b967d5b /conn.go
parent52d797ce1ab590a7988edcbe13ce7ca31ab7c4ef (diff)
Avoid using v6-mapped-v4
Diffstat (limited to 'conn.go')
-rw-r--r--conn.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/conn.go b/conn.go
index d3919ca..fc503bf 100644
--- a/conn.go
+++ b/conn.go
@@ -58,6 +58,10 @@ func parseEndpoint(s string) (*net.UDPAddr, error) {
if err != nil {
return nil, err
}
+ ip4 := addr.IP.To4()
+ if ip4 != nil {
+ addr.IP = ip4
+ }
return addr, err
}