]> Cypherpunks.ru repositories - gostls13.git/commit
net: handle the network parameter properly in LookupPort
authorMateusz Poliwczak <mpoliwczak34@gmail.com>
Mon, 2 Oct 2023 16:24:26 +0000 (16:24 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 2 Oct 2023 23:13:53 +0000 (23:13 +0000)
commitef3171c5eb4bc22b79690afb36bbb1e681473ea0
tree59e037b3aa22bbe32cb228bbe1630280a26ee1df
parent340a4f55c4afac5b74c8df8365decb0c0237d710
net: handle the network parameter properly in LookupPort

The cgo version (unix) is populating the GetAddrInfo hints
based on the network parameter, but windows not quite.

This change populates the hints the same way as the
cgo unix version does now.

This bug was spotted by Bryan in CL 530415.
https://go-review.googlesource.com/c/go/+/530415/comment/76640dc7_ed0409ca/

Change-Id: I6fc29b1e4cdc879123ab0f5a624b6f37c68c00ba
GitHub-Last-Rev: eaa616378b3fa9a5a72192f3d501c591804f45d8
GitHub-Pull-Request: golang/go#63284
Reviewed-on: https://go-review.googlesource.com/c/go/+/531635
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Mateusz Poliwczak <mpoliwczak34@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David du Colombier <0intro@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/net/cgo_unix.go
src/net/lookup.go
src/net/lookup_plan9.go
src/net/lookup_test.go
src/net/lookup_windows.go