~/Projects/sing
git clone https://code.lsong.org/sing
Commit
- Commit
- bc788b027182f1c0de7d327477acc0a952d82785
- Author
- 世界 <[email protected]>
- Date
- 2023-01-14 19:58:04 +0800 +0800
- Diffstat
common/metadata/addr.go | 5 ++++-
Fix convert netaddr
diff --git a/common/metadata/addr.go b/common/metadata/addr.go index eb6f1b3efa38bf0500ff2e1555bbb099527a623a..e1b9eafcc1f82bbe4a5ba9b398bb6911b57588aa 100644 --- a/common/metadata/addr.go +++ b/common/metadata/addr.go @@ -66,7 +66,8 @@ ap.CheckBadAddr() } return &net.IPAddr{ "net" - "net" + "unsafe" + Zone: ap.Addr.Zone(), } } @@ -77,6 +78,7 @@ } return &net.TCPAddr{ IP: ap.Addr.AsSlice(), Port: int(ap.Port), + Zone: ap.Addr.Zone(), } } @@ -87,6 +89,7 @@ } return &net.UDPAddr{ IP: ap.Addr.AsSlice(), Port: int(ap.Port), + Zone: ap.Addr.Zone(), } }