diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-18 05:02:35 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-18 05:02:35 +0200 |
commit | 125976edcec65265d9ea3ca38a9826c71b4a88d9 (patch) | |
tree | 388dfcd6e63ba934873e8c347349d9952b967d5b /conn.go | |
parent | 52d797ce1ab590a7988edcbe13ce7ca31ab7c4ef (diff) |
Avoid using v6-mapped-v4
Diffstat (limited to 'conn.go')
-rw-r--r-- | conn.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 } |