Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: fix TestDialGoogle with -ipv6 when CGO_ENABLED=0
Under some dial tests that require external network connectivity, we must prevent application traffic but must not interfere with control plane traffic such as DNS message exchange. But test helper function disableSocketConnect prevents both application and control plane traffic unconditionally and makes some dial tests with -ipv6 fail when CGO_ENABLED=0. This change makes disableSocketConnect take a look at not only address family but socket type for fixing some dial tests with -ipv6 when CGO_ENBALED=0. Change-Id: I32241d9592d31483424bb5e69cb4d56f3fc20312 Reviewed-on: https://go-review.googlesource.com/8743 Reviewed-by: Ian Lance Taylor <[email protected]>
- Loading branch information